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

Update manual to reflect pragma nolistcode and correct nolist semantics
author William Astle <lost@l-w.ca>
date Fri, 01 Dec 2023 21:16:54 -0700
parents 1faf14de9d04
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
489
52af0aa54fe5 Update html and pdf documentation in preparation for release
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">
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
2 <HTML
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
3 ><HEAD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
4 ><TITLE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
5 >Assembler Modes and Pragmas</TITLE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
6 ><META
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
7 NAME="GENERATOR"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
9 REL="HOME"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
10 TITLE="LW Tool Chain"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
11 HREF="index.html"><LINK
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
12 REL="UP"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
13 TITLE="LWASM"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
14 HREF="c62.html"><LINK
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
15 REL="PREVIOUS"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
16 TITLE="Object Files and Sections"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
17 HREF="x606.html"><LINK
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
18 REL="NEXT"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
19 TITLE="Convenience Instructions"
563
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
20 HREF="x821.html"></HEAD
489
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
21 ><BODY
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
22 CLASS="SECTION"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
23 BGCOLOR="#FFFFFF"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
24 TEXT="#000000"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
25 LINK="#0000FF"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
26 VLINK="#840084"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
27 ALINK="#0000FF"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
28 ><DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
29 CLASS="NAVHEADER"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
30 ><TABLE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
31 SUMMARY="Header navigation table"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
32 WIDTH="100%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
33 BORDER="0"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
34 CELLPADDING="0"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
35 CELLSPACING="0"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
36 ><TR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
37 ><TH
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
38 COLSPAN="3"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
39 ALIGN="center"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
40 >LW Tool Chain</TH
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
41 ></TR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
42 ><TR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
43 ><TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
44 WIDTH="10%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
45 ALIGN="left"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
46 VALIGN="bottom"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
47 ><A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
48 HREF="x606.html"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
49 ACCESSKEY="P"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
50 >Prev</A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
51 ></TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
52 ><TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
53 WIDTH="80%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
54 ALIGN="center"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
55 VALIGN="bottom"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
56 >Chapter 3. LWASM</TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
57 ><TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
58 WIDTH="10%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
59 ALIGN="right"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
60 VALIGN="bottom"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
61 ><A
563
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
62 HREF="x821.html"
489
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
63 ACCESSKEY="N"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
64 >Next</A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
65 ></TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
66 ></TR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
67 ></TABLE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
68 ><HR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
69 ALIGN="LEFT"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
70 WIDTH="100%"></DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
71 ><DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
72 CLASS="SECTION"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
73 ><H1
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
74 CLASS="SECTION"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
75 ><A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
76 NAME="AEN670"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
77 >3.10. Assembler Modes and Pragmas</A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
78 ></H1
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
79 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
80 >There are a number of options that affect the way assembly is performed.
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
81 Some of these options can only be specified on the command line because
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
82 they determine something absolute about the assembly process. These include
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
83 such things as the output target. Other things may be switchable during
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
84 the assembly process. These are known as pragmas and are, by definition,
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
85 not portable between assemblers.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
86 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
87 >LWASM supports a number of pragmas that affect code generation or
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
88 otherwise affect the behaviour of the assembler. These may be specified by
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
89 way of a command line option or by assembler directives. The directives
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
90 are as follows.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
91 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
92 ></P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
93 ><DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
94 CLASS="VARIABLELIST"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
95 ><DL
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
96 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
97 >PRAGMA <CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
98 CLASS="PARAMETER"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
99 >pragma[,...]</CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
100 ></DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
101 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
102 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
103 >Specifies that the assembler should bring into force all <CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
104 CLASS="PARAMETER"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
105 >pragma</CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
106 >s
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
107 specified. Any unrecognized pragma will cause an assembly error. The new
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
108 pragmas will take effect immediately. This directive should be used when
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
109 the program will assemble incorrectly if the pragma is ignored or not supported.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
110 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
111 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
112 >*PRAGMA <CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
113 CLASS="PARAMETER"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
114 >pragma[,...]</CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
115 ></DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
116 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
117 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
118 >This is identical to the PRAGMA directive except no error will occur with
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
119 unrecognized or unsupported pragmas. This directive, by virtue of starting
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
120 with a comment character, will also be ignored by assemblers that do not
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
121 support this directive. Use this variation if the pragma is not required
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
122 for correct functioning of the code.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
123 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
124 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
125 >*PRAGMAPUSH <CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
126 CLASS="PARAMETER"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
127 >pragma[,...]</CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
128 ></DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
129 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
130 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
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
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
132 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
133 >This directive will not throw any errors for any reason.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
134 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
135 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
136 >*PRAGMAPOP <CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
137 CLASS="PARAMETER"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
138 >pragma[,...]</CODE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
139 ></DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
140 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
141 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
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
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
143 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
144 >This directive will not throw any errors for any reason.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
145 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
146 ></DL
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
147 ></DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
148 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
149 >Each pragma supported has a positive version and a negative version.
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
150 The positive version enables the pragma while the negative version disables
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
151 it. The negatitve version is simply the positive version with "no" prefixed
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
152 to it. For instance, "pragma" vs. "nopragma". When only one version is
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
153 listed below, its opposite can be obtained by prepending "no" if it is not
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
154 present or removing "no" from the beginning if it is present.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
155 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
156 >Pragmas are not case sensitive.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
157 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
158 ></P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
159 ><DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
160 CLASS="VARIABLELIST"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
161 ><DL
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
162 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
163 >6800compat</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
164 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
165 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
166 >When in force, this pragma enables recognition of various
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
167 compatibility instructions useful when assembling 6800 code. These
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
168 compatibility instructions are assembled into equivalent 6809 instructions.
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
169 This mode also includes several analogous instructions which are not
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
170 strictly 6800 instructions but allow the similar style to be applied to 6809
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
171 specific features.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
172 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
173 >Technically, a compliant 6809 assembler must recognize these
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
174 instructions by default since Motorola advertised the 6809 as being source
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
175 compatible with the 6800. However, most source code does not require this
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
176 compatibility and LWASM itself did not support these instructions prior to
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
177 version 4.11 so this mode is disabled by default.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
178 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
179 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
180 >6809</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
181 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
182 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
183 >This pragma allows you to mark a section of code as 6809-only. In ths mode,
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
184 the assembler will throw an error if any 6309 instructions are used.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
185 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
186 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
187 >6309</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
188 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
189 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
190 >This pragma enables the use of 6309 instructions and disables any 6809 specific
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
191 instructions. It also changes the cycle count listing output (if selected)
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
192 to display 6309 timings.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
193 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
194 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
195 >6809conv, 6309conv</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
196 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
197 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
198 >These pragmas enable convenience instructions extending the 6809 and 6309
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
199 instruction sets respectively. For more information, see
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
200 <A
563
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
201 HREF="x821.html"
489
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
202 >Section 3.11</A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
203 >.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
204 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
205 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
206 >index0tonone</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
207 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
208 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
209 >When in force, this pragma enables an optimization affecting indexed addressing
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
210 modes. When the offset expression in an indexed mode evaluates to zero but is
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
211 not explicity written as 0, this will replace the operand with the equivalent
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
212 no offset mode, thus creating slightly faster code. Because of the advantages
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
213 of this optimization, it is enabled by default.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
214 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
215 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
216 >cescapes</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
217 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
218 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
219 >This pragma will cause strings in the FCC, FCS, and FCN pseudo operations to
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
220 have C-style escape sequences interpreted. The one departure from the official
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
221 spec is that unrecognized escape sequences will return either the character
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
222 immediately following the backslash or some undefined value. Do not rely
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
223 on the behaviour of undefined escape sequences.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
224 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
225 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
226 >importundefexport</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
227 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
228 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
229 >This pragma is only valid for targets that support external references. When
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
230 in force, it will cause the EXPORT directive to act as IMPORT if the symbol
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
231 to be exported is not defined. This is provided for compatibility with the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
232 output of gcc6809 and should not be used in hand written code. Because of
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
233 the confusion this pragma can cause, it is disabled by default.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
234 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
235 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
236 >undefextern</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
237 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
238 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
239 >This pragma is only valid for targets that support external references. When in
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
240 force, if the assembler sees an undefined symbol on the second pass, it will
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
241 automatically define it as an external symbol. This automatic definition will
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
242 apply for the remainder of the assembly process, even if the pragma is
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
243 subsequently turned off. Because this behaviour would be potentially surprising,
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
244 this pragma defaults to off.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
245 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
246 >The primary use for this pragma is for projects that share a large number of
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
247 symbols between source files. In such cases, it is impractical to enumerate
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
248 all the external references in every source file. This allows the assembler
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
249 and linker to do the heavy lifting while not preventing a particular source
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
250 module from defining a local symbol of the same name as an external symbol
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
251 if it does not need the external symbol. (This pragma will not cause an
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
252 automatic external definition if there is already a locally defined symbol.)</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
253 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
254 >This pragma will often be specified on the command line for large projects.
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
255 However, depending on the specific dynamics of the project, it may be sufficient
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
256 for one or two files to use this pragma internally.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
257 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
258 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
259 >export</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
260 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
261 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
262 >This pragma causes all symbols to be added to the export list
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
263 automatically. This is useful when a large number of symbols need to be
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
264 exported but you do not wish to include an EXPORT directive for all of them.
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
265 This is often useful on the command line but might be useful even inline
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
266 with the PRAGMA directive if a large number of symbols in a row are to be
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
267 exported.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
268 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
269 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
270 >dollarlocal</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
271 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
272 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
273 >When set, a "$" in a symbol makes it local. When not set, "$" does not
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
274 cause a symbol to be local. It is set by default except when using the OS9
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
275 target.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
276 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
277 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
278 >dollarnotlocal</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
279 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
280 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
281 > This is the same as the "dollarlocal" pragma except its sense is
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
282 reversed. That is, "dollarlocal" and "nodollarnotlocal" are equivalent and
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
283 "nodollarlocal" and "dollarnotlocal" are equivalent. </P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
284 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
285 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
286 >pcaspcr</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
287 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
288 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
289 > Normally, LWASM makes a distinction between PC and PCR in program
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
290 counter relative addressing. In particular, the use of PC means an absolute
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
291 offset from PC while PCR causes the assembler to calculate the offset to the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
292 specified operand and use that as the offset from PC. By setting this
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
293 pragma, you can have PC treated the same as PCR. </P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
294 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
295 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
296 >shadow</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
297 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
298 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
299 >When this pragma is in effect, it becomes possible to define a macro
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
300 that matches an internal operation code. Thus, it makes it possible to
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
301 redefine either CPU instructions or pseudo operations. Because this feature
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
302 is of dubious utility, it is disabled by default.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
303 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
304 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
305 >nolist</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
306 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
307 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
308 >Lines where this pragma is in effect will not appear in the assembly
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
309 listing. Also, any symbols defined under this pragma will not show up in
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
310 the symbol list. This is most useful in include files to avoid spamming the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
311 assembly listing with dozens, hundreds, or thousands of irrelevant
563
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
312 symbols. It is important to note that this pragma will not hide lines that
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
313 generate output to the binary.</P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
314 ></DD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
315 ><DT
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
316 >nolistcode</DT
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
317 ><DD
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
318 ><P
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
319 >Lines where this pragma is in effect will not appear in the assembly
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
320 listing. Also, any symbols defined under this pragma will not show up in
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
321 the symbol list. This is most useful in include files to avoid spamming the
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
322 assembly listing with dozens, hundreds, or thousands of irrelevant
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
323 symbols. Unlike "nolist", this pragma will hide lines that generate output
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
324 to the binary.</P
489
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
325 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
326 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
327 >autobranchlength</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
328 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
329 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
330 >One of the perennial annoyances for 6809 programmers is that the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
331 mneumonics for the short and long branch instructions are different (bxx vs.
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
332 lbxx), which is at odds with the rest of the instruction set. This pragma
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
333 is a solution to those annoying byte overflow errors that short branch
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
334 instructions tend to aquire.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
335 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
336 >When this pragma is in effect, which is not the default, whenever any
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
337 relative branch instruction is used, its size will be automatically
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
338 determined based on the actual distance to the destination. In other words,
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
339 one can write code with long or short branches everywhere and the assembler
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
340 will choose a size for the branch.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
341 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
342 >Also, while this pragma is in effect, the &#62; and &#60; symbols can be used
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
343 to force the branch size, analogous to their use for other instructions with
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
344 &#60; forcing 8 bit offsets and &#62; forcing 16 bit offets.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
345 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
346 >Because this pragma leads to source that is incompatible with other
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
347 assemblers, it is strongly recommended that it be invoked using the PRAGMA
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
348 directive within the source code rather than on the command line or via the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
349 *PRAGMA directive. This way, an error will be raised if someone tries to
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
350 assemble the code under a different assembler.</P
517
1faf14de9d04 Update manual to correctly reflect forwardrefmax behaviour
William Astle <lost@l-w.ca>
parents: 489
diff changeset
351 ><P
1faf14de9d04 Update manual to correctly reflect forwardrefmax behaviour
William Astle <lost@l-w.ca>
parents: 489
diff changeset
352 >Note that if the "forwardrefmax" pragma is ineffect, as is the current
1faf14de9d04 Update manual to correctly reflect forwardrefmax behaviour
William Astle <lost@l-w.ca>
parents: 489
diff changeset
353 default, this pragma will not behave as expected.</P
489
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
354 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
355 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
356 >nosymbolcase, symbolnocase</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
357 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
358 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
359 >Any symbol defined while this pragma is in force will be treated as
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
360 case insensitive, regardless whether the pragma is in force when the symbol
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
361 is referenced.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
362 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
363 >It is important to note that this pragma will not work as expected in
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
364 all cases when using the object file assembly target. It is intended for
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
365 use only when the assembler will be producing the final binary.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
366 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
367 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
368 >condundefzero</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
369 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
370 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
371 >This pragma will cause the assembler to change the way it handles
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
372 symbols in conditional expressions. Ordinarily, any symbol that is not
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
373 defined prior to the conditional will throw an undefined symbol error. With
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
374 this pragma in effect, symbols that are not yet defined at the point the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
375 conditional is encountered will be treated as zero.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
376 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
377 >This is not the default because it encourages poor code design. One
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
378 should use the "IFDEF" or "IFNDEF" conditionals to test for the presence of
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
379 a symbol.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
380 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
381 >It is important to note that if a symbol is defined but it does not
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
382 yet evaluate to a constant value at the point where the conditional appears,
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
383 the assembler will still complain about a non constant condition.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
384 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
385 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
386 >forwardrefmax</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
387 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
388 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
389 >This pragma will disable forward reference optimization completely.
517
1faf14de9d04 Update manual to correctly reflect forwardrefmax behaviour
William Astle <lost@l-w.ca>
parents: 489
diff changeset
390 However, many source files, especially
489
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
391 those not using the PCR relative addressing modes, this optimization is
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
392 pointless since the assembler will almost certainly settle on a 16 bit
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
393 offset or address. If all variables in the direct page are defined before
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
394 the main body of the code, the benefit of forward reference optimization
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
395 almost certainly vanishes completely. However, the cost of doing that
517
1faf14de9d04 Update manual to correctly reflect forwardrefmax behaviour
William Astle <lost@l-w.ca>
parents: 489
diff changeset
396 optimization remains and can result in a very long assembly time. Because
1faf14de9d04 Update manual to correctly reflect forwardrefmax behaviour
William Astle <lost@l-w.ca>
parents: 489
diff changeset
397 of this, "forwardrefmax" has been the default setting since version 4.14 of
1faf14de9d04 Update manual to correctly reflect forwardrefmax behaviour
William Astle <lost@l-w.ca>
parents: 489
diff changeset
398 LWTOOLS. To turn it off, use "noforwardrefmax".</P
489
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
399 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
400 >Enabling this pragma will cause all forward references to use the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
401 maximum offset or address size, much the same has EDTASM and other pure
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
402 two pass assemblers do. The side effect is that all line lengths and
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
403 symbol values are fully resolved after the initial parsing pass and the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
404 amount of work to resolve everything becomes almost nil.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
405 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
406 >While this pragma can be applied selectively to sections of source
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
407 code (use *PRAGMA if doing so and compatibility with other assemblers
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
408 is desired), it is likely more useful when provided as a command line
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
409 pragma.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
410 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
411 >It should be noted that the presence or absence of this pragma
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
412 will not change the correctness of the generated code unless cycle counts
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
413 or byte counts are critical (which they usually are not). It also will
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
414 not override the operand size override prefixes (&lt; and &gt;). It only
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
415 applies when the assembler is left to guess what the operand size is.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
416 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
417 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
418 >operandsizewarning</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
419 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
420 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
421 >Enabling this pragma will cause LWASM to show a warning when it
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
422 detects that a smaller addressing mode could be used for an instruction.
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
423 This is particularly useful for finding places where long branches are used
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
424 where short branches could be used instead. It will also show the warnings
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
425 for indexing offsets (regardless of whether the operand size is
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
426 forced).</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
427 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
428 >As of LWASM 4.16, no other checks are performed.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
429 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
430 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
431 >qrts</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
432 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
433 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
434 >&#13;Enables the use of the ?RTS branch target. ?RTS is implemented to maintain
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
435 compatibility with the MACRO-80c assembler. It works by searching backward
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
436 in the code for an RTS instruction. If none is found, it inverts the branch
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
437 logic and inserts an RTS following the branch instruction. Below you can
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
438 see how a BMI (2B xx) has been assembled as a BPL *+1 (2A 01) to skip over an
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
439 inserted RTS (39).</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
440 ><PRE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
441 CLASS="PROGRAMLISTING"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
442 >1D1E 7D1D1D TST WHICH1
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
443 1D21 2A0139 BMI ?RTS
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
444 1D24 BD1D65 JSR INV</PRE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
445 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
446 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
447 >m80ext</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
448 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
449 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
450 >&#13;This pragma (along with pragma qrts) enables some uncommon behaviors to
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
451 accomodate The Micro Works MACRO-80c assembler from 1982. This assembler
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
452 was used by a number of notable TRS-80 Color Computer applications and the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
453 goal of this pragma is to allow them to build identical binaries from
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
454 unmodified, vintage source code.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
455 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
456 >&#13;In m80ext mode, the handling of the "END" pseudo-op changes when used inside
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
457 an include file. Instead of terminating all assembly, it merely stops
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
458 processing of the current include file (this behavior matches the original
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
459 Motorola 6809 assembler). In addition, loading an ASCII value with a single
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
460 quote (e.g., LDA #'N) is extended to 16-bit registers (e.g., LDD #'NO).
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
461 LWASM normally supports this via double quote and that is the proper use in
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
462 modern code. Finally, the FCC pseudo-op is extended to handle FCB-like
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
463 behavior after the closing delimiter:</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
464 ><PRE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
465 CLASS="PROGRAMLISTING"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
466 > FCC "Greetings from 1982",13,0</PRE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
467 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
468 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
469 >testmode</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
470 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
471 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
472 >&#13;This pragma is intended for internal testing purposes. In testmode, the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
473 assembler searches for a specially-formatted comment starting with a
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
474 semicolon followed by a period. Immediately afterward are a list of hex
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
475 bytes that the assembler is expected to generate. Likewise, if the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
476 assembler is expected to throw an error or warning on a given line, you can
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
477 check by specifying "E:" followed by the error number. In this case the
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
478 error is ignored and the assembler continues ignoring the line in question.&#13;</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
479 ><PRE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
480 CLASS="PROGRAMLISTING"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
481 >1D1E 7D1D1D TST WHICH1 ;.7d1d1d
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
482 1D21 2A0139 BMI ?RTS ;.2a0139
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
483 1D24 1D24 FDB * ;.1d24
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
484 1D26 xyz INV ;.E:32 (Error 32 is "Bad opcode")</PRE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
485 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
486 ><DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
487 >emuext</DT
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
488 ><DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
489 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
490 >&#13;This pragma enables two instructions useful when running code in compatible
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
491 emulators. Break breaks into the debugger. Log writes printf-style
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
492 output to the debug window&#13;</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
493 ><PRE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
494 CLASS="PROGRAMLISTING"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
495 > LOG ; log output
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
496 FDB FSTR ; pointer to format string
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
497 FDB PX1 ; 16 bit pointer to 16 bit value
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
498 FDB PY1 ; 16 bit pointer to 8 bit value (see format string!)
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
499 FDB PX2 ; 16 bit pointer to 16 bit value
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
500 FDB PY2 ; 16 bit pointer to 8 bit value
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
501 ; execution continues here ...
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
502 RTS
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
503
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
504 ; format string
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
505 FSTR FCC "%hu,%hhu - %hu,%hhu"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
506 FCB 10,0</PRE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
507 ></DD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
508 ></DL
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
509 ></DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
510 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
511 >As a convenience, each input file has a pragma state stack. This
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
512 allows, through the use of *PRAGMAPUSH and *PRAGMAPOP, a file to change a
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
513 pragma state and then restore it to the precise state it had previously.
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
514 If, at the end of an input file, all pragma states have not been popped,
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
515 they will be removed from the stack. Thus, it is critical to employ
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
516 *PRAGMAPOP correctly. Because each input file has its own pragma stack,
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
517 using *PRAGMAPUSH in one file and *PRAGMAPOP in another file will not
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
518 work.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
519 ><P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
520 >Pragma stacks are more useful in include files, in particular in
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
521 conjunction with the nolist pragma. One can push the state of the nolist
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
522 pragma, engage the nolist pragma, and then pop the state of the nolist
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
523 pragma at the end of the include file. This will cause the entire include
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
524 file to operate under the nolist pragma. However, if the file is included
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
525 while nolist is already engaged, it will not undo that state.</P
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
526 ></DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
527 ><DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
528 CLASS="NAVFOOTER"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
529 ><HR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
530 ALIGN="LEFT"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
531 WIDTH="100%"><TABLE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
532 SUMMARY="Footer navigation table"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
533 WIDTH="100%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
534 BORDER="0"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
535 CELLPADDING="0"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
536 CELLSPACING="0"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
537 ><TR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
538 ><TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
539 WIDTH="33%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
540 ALIGN="left"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
541 VALIGN="top"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
542 ><A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
543 HREF="x606.html"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
544 ACCESSKEY="P"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
545 >Prev</A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
546 ></TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
547 ><TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
548 WIDTH="34%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
549 ALIGN="center"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
550 VALIGN="top"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
551 ><A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
552 HREF="index.html"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
553 ACCESSKEY="H"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
554 >Home</A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
555 ></TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
556 ><TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
557 WIDTH="33%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
558 ALIGN="right"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
559 VALIGN="top"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
560 ><A
563
8c6c3363e18e Update manual to reflect pragma nolistcode and correct nolist semantics
William Astle <lost@l-w.ca>
parents: 517
diff changeset
561 HREF="x821.html"
489
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
562 ACCESSKEY="N"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
563 >Next</A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
564 ></TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
565 ></TR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
566 ><TR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
567 ><TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
568 WIDTH="33%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
569 ALIGN="left"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
570 VALIGN="top"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
571 >Object Files and Sections</TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
572 ><TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
573 WIDTH="34%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
574 ALIGN="center"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
575 VALIGN="top"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
576 ><A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
577 HREF="c62.html"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
578 ACCESSKEY="U"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
579 >Up</A
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
580 ></TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
581 ><TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
582 WIDTH="33%"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
583 ALIGN="right"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
584 VALIGN="top"
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
585 >Convenience Instructions</TD
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
586 ></TR
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
587 ></TABLE
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
588 ></DIV
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
589 ></BODY
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
590 ></HTML
52af0aa54fe5 Update html and pdf documentation in preparation for release
William Astle <lost@l-w.ca>
parents:
diff changeset
591 >