changeset 227:4c60c3a09597

Various updates to the manual
author lost
date Fri, 12 Jun 2009 00:06:24 +0000
parents c8787fad0f9f
children 560843a951f7
files doc/manual.docbook.sgml
diffstat 1 files changed, 74 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/doc/manual.docbook.sgml	Fri Jun 12 00:06:13 2009 +0000
+++ b/doc/manual.docbook.sgml	Fri Jun 12 00:06:24 2009 +0000
@@ -98,18 +98,33 @@
 object files into a final binary in any of LWLINK's supported binary
 formats.</para>
 
-<para>Object files are very flexible in that they allow references that are not
-known at assembly time to be resolved at link time. However, because the
-addresses of such references are not known, there is no way for the assembler
-has to use sixteen bit addressing modes for these references. The linker
-will always use sixteen bits when resolving a reference which means any
-instruction that requires an eight bit operand cannot use external references.
-</para>
-
 <para>Object files also support the concept of sections which are not valid
 for other output types. This allows related code from each object file
 linked to be collapsed together in the final binary.</para> 
 
+<para>
+Object files are very flexible in that they allow references that are not
+known at assembly time to be resolved at link time.  However, because the
+addresses of such references are not known at assembly time, there is no way
+for the assembler to deduce that an eight bit addressing mode is possible. 
+That means the assember will default to using sixteen bit addressing
+whenever an external or cross-section reference is used.
+</para>
+
+<para>
+As of LWASM 2.4, it is possible to force direct page addressing for an
+external reference.  Care must be taken to ensure the resulting addresses
+are really in the direct page since the linker does not know what the direct
+page is supposed to be and does not emit errors for byte overflows.
+</para>
+
+<para>
+It is also possible to use external references in an eight bit immediate
+mode instruction.  In this case, only the low order eight bits will be used. 
+Again, no byte overflows will be flagged.
+</para>
+
+
 </section>
 
 </chapter>
@@ -367,17 +382,35 @@
 prefixing the characters with a quote (").</para>
 
 <para>
-LWASM supports the following basic binary operators: +, -, *, /, and %.
-These represent addition, subtraction, multiplication, division, and modulus.
-It also supports unary negation and unary 1's complement (- and ^ respectively).
-For completeness, a unary positive (+) is supported though it is a no-op.
+
+LWASM supports the following basic binary operators: +, -, *, /, and %. 
+These represent addition, subtraction, multiplication, division, and
+modulus.  It also supports unary negation and unary 1's complement (- and ^
+respectively).  It is also possible to use ~ for the unary 1's complement
+operator.  For completeness, a unary positive (+) is supported though it is
+a no-op.  LWASM also supports using |, &, and ^ for bitwise or, bitwise and,
+and bitwise exclusive or respectively.
+
 </para>
 
-<para>Operator precedence follows the usual rules. multiplication, division,
-and modulus take precedence over addition and subtraction. Unary operators
-take precedence over binary operators. To force a specific order of evaluation,
+<para>
+
+Operator precedence follows the usual rules. Multiplication, division, and
+modulus take precedence over addition and subtraction.  Unary operators take
+precedence over binary operators.  Bitwise operators are lower precdence
+than addition and subtraction.  To force a specific order of evaluation,
 parentheses can be used in the usual manner.
+
 </para>
+
+<para>
+
+As of LWASM 2.5, the operators && and || are recognized for boolean and and
+boolean or respectively.  They will return either 0 or 1 (false or true). 
+They have the lowest precedence of all the binary operators.
+
+</para>
+
 </section>
 
 <section>
@@ -520,6 +553,19 @@
 </para>
 </listitem>
 </varlistentry>
+
+<varlistentry>
+<term>INCLUDEBIN <parameter>filename</parameter></term>
+<listitem>
+<para>
+Treat the contents of <parameter>filename</parameter> as a string of bytes to
+be included literally at the current assembly point. This has the same effect
+as converting the file contents to a series of FCB statements and including
+those at the current assembly point.
+</para>
+</listitem>
+</varlistentry>
+
 </variablelist>
 
 </section>
@@ -1095,6 +1141,19 @@
 </varlistentry>
 
 <varlistentry>
+<term>importundefexport</term>
+<listitem>
+<para>
+This pragma is only valid for targets that support external references. When
+in force, it will cause the EXPORT directive to act as IMPORT if the symbol
+to be exported is not defined.  This is provided for compatibility with the
+output of gcc6809 and should not be used in hand written code.  Because of
+the confusion this pragma can cause, it is disabled by default.
+</para>
+</listitem>
+</varlistentry>
+
+<varlistentry>
 <term>undefextern</term>
 <listitem>
 <para>