diff docs/manual/x628.html @ 347:330a66a0f45a

Document the forwardrefmax pragma Since the forwardrefmax is useful for combatting huge assembly times in many sources, actually document it so people can find it.
author William Astle <lost@l-w.ca>
date Thu, 09 Apr 2015 12:51:02 -0600
parents 507f442dc71e
children
line wrap: on
line diff
--- a/docs/manual/x628.html	Thu Apr 09 12:36:07 2015 -0600
+++ b/docs/manual/x628.html	Thu Apr 09 12:51:02 2015 -0600
@@ -17,7 +17,7 @@
 HREF="x564.html"><LINK
 REL="NEXT"
 TITLE="LWLINK"
-HREF="c727.html"></HEAD
+HREF="c734.html"></HEAD
 ><BODY
 CLASS="SECTION"
 BGCOLOR="#FFFFFF"
@@ -59,7 +59,7 @@
 ALIGN="right"
 VALIGN="bottom"
 ><A
-HREF="c727.html"
+HREF="c734.html"
 ACCESSKEY="N"
 >Next</A
 ></TD
@@ -341,6 +341,37 @@
 yet evaluate to a constant value at the point where the conditional appears,
 the assembler will still complain about a non constant condition.</P
 ></DD
+><DT
+>forwardrefmax</DT
+><DD
+><P
+>This pragma will disable forward reference optimization completely.
+Ordinarily, LWASM will attempt to select the shortest possible addressing
+mode for forward references.  However, in many source files, especially
+those not using the PCR relative addressing modes, this optimization is
+pointless since the assembler will almost certainly settle on a 16 bit
+offset or address.  If all variables in the direct page are defined before
+the main body of the code, the benefit of forward reference optimization
+almost certainly vanishes completely.  However, the cost of doing that
+optimization remains and can result in a very long assembly time.</P
+><P
+>Enabling this pragma will cause all forward references to use the
+maximum offset or address size, much the same has EDTASM and other pure
+two pass assemblers do. The side effect is that all line lengths and
+symbol values are fully resolved after the initial parsing pass and the
+amount of work to resolve everything becomes almost nil.</P
+><P
+>While this pragma can be applied selectively to sections of source
+code (use *PRAGMA if doing so and compatibility with other assemblers
+is desired), it is likely more useful when provided as a command line
+pragma.</P
+><P
+>It should be noted that the presence or absence of this pragma
+will not change the correctness of the generated code unless cycle counts
+or byte counts are critical (which they usually are not). It also will
+not override the operand size override prefixes (&lt; and &gt;). It only
+applies when the assembler is left to guess what the operand size is.</P
+></DD
 ></DL
 ></DIV
 ><P
@@ -394,7 +425,7 @@
 ALIGN="right"
 VALIGN="top"
 ><A
-HREF="c727.html"
+HREF="c734.html"
 ACCESSKEY="N"
 >Next</A
 ></TD