comparison docs/manual.docbook.sgml @ 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 e95f07cbce4e
children 379ef4e08dd2
comparison
equal deleted inserted replaced
346:9e35f7a1fca1 347:330a66a0f45a
1844 the assembler will still complain about a non constant condition.</para> 1844 the assembler will still complain about a non constant condition.</para>
1845 1845
1846 1846
1847 </listitem> 1847 </listitem>
1848 </varlistentry> 1848 </varlistentry>
1849
1850 <varlistentry>
1851 <term>forwardrefmax</term>
1852 <listitem>
1853
1854 <para>This pragma will disable forward reference optimization completely.
1855 Ordinarily, LWASM will attempt to select the shortest possible addressing
1856 mode for forward references. However, in many source files, especially
1857 those not using the PCR relative addressing modes, this optimization is
1858 pointless since the assembler will almost certainly settle on a 16 bit
1859 offset or address. If all variables in the direct page are defined before
1860 the main body of the code, the benefit of forward reference optimization
1861 almost certainly vanishes completely. However, the cost of doing that
1862 optimization remains and can result in a very long assembly time.</para>
1863
1864 <para>Enabling this pragma will cause all forward references to use the
1865 maximum offset or address size, much the same has EDTASM and other pure
1866 two pass assemblers do. The side effect is that all line lengths and
1867 symbol values are fully resolved after the initial parsing pass and the
1868 amount of work to resolve everything becomes almost nil.</para>
1869
1870 <para>While this pragma can be applied selectively to sections of source
1871 code (use *PRAGMA if doing so and compatibility with other assemblers
1872 is desired), it is likely more useful when provided as a command line
1873 pragma.</para>
1874
1875 <para>It should be noted that the presence or absence of this pragma
1876 will not change the correctness of the generated code unless cycle counts
1877 or byte counts are critical (which they usually are not). It also will
1878 not override the operand size override prefixes (&lt; and &gt;). It only
1879 applies when the assembler is left to guess what the operand size is.</para>
1880
1881 </listitem>
1882 </varlistentry>
1883
1849 1884
1850 </variablelist> 1885 </variablelist>
1851 1886
1852 <para>As a convenience, each input file has a pragma state stack. This 1887 <para>As a convenience, each input file has a pragma state stack. This
1853 allows, through the use of *PRAGMAPUSH and *PRAGMAPOP, a file to change a 1888 allows, through the use of *PRAGMAPUSH and *PRAGMAPOP, a file to change a