# HG changeset patch # User lost@l-w.ca # Date 1279926537 21600 # Node ID 62cb50c50976c94491f218a54609f446f440836f # Parent 54499b799779fd61f3e084bb9fa13fa9b3e27844 Cosmetic updates to documentation; added warning pseudo op diff -r 54499b799779 -r 62cb50c50976 configure.ac --- a/configure.ac Fri Jul 23 16:40:51 2010 -0600 +++ b/configure.ac Fri Jul 23 17:08:57 2010 -0600 @@ -1,4 +1,4 @@ -AC_INIT([LWTools], [3.0-pre], [lost@l-w.ca]) +AC_INIT([LWTools], [3.0-beta1], [lost@l-w.ca]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) AC_PROG_CC gl_EARLY diff -r 54499b799779 -r 62cb50c50976 doc/manual.docbook.sgml --- a/doc/manual.docbook.sgml Fri Jul 23 16:40:51 2010 -0600 +++ b/doc/manual.docbook.sgml Fri Jul 23 17:08:57 2010 -0600 @@ -3,7 +3,7 @@ LW Tool Chain WilliamAstle -2009William Astle +2009, 2010William Astle @@ -443,7 +443,7 @@ By default, unless assembling to the os9 target, a "$" in the symbol will also make it local. This can be controlled by the "dollarlocal" and -"nodollarlocal" pragmas. In the absence of a pragma to the contrary, For +"nodollarlocal" pragmas. In the absence of a pragma to the contrary, for the os9 target, a "$" in the symbol will not make it considered local while for all other targets it will. @@ -760,8 +760,16 @@ Conditional expressions are only evaluated on the first assembly pass. It is not possible to game the assembly process by having a conditional -change its value between assembly passes. Thus there is not and never will -be any equivalent of IFP1 or IFP2 as provided by other assemblers. +change its value between assembly passes. Due to the underlying architecture +of LWASM, there is no possible utility to IFP1 and IFP2, nor can they, as of LWASM 3.0, actually +be implemented meaningfully. Thus there is not and never will +be any equivalent of IFP1 or IFP2 as provided by other assemblers. Use of those opcodes +will throw a warning and be ignored. + +It is important to note that if a conditional does not resolve to a constant +during the first parsing pass, an error will be thrown. This is unavoidable because the assembler +must make a decision about which source to include and which source to exclude at this stage. +Thus, expressions that work normally elsewhere will not work for conditions. @@ -941,6 +949,15 @@ Note that the USE variation is provided only for compatibility with other assemblers. It is recommended to use the INCLUDE variation. +If filename begins with a "/", it is +interpreted as an absolute path. If it does not, the search path will be used +to find the file. First, the directory containing the file that contains this +directive. (Includes within an included file are relative to the included file, +not the file that included it.) If the file is not found there, the include path +is searched. If it is still not found, an error will be thrown. Note that the +current directory as understood by your shell or operating system is not searched. + + @@ -962,7 +979,21 @@ Causes a custom error message to be printed at this line. This will cause assembly to fail. This directive is most useful inside conditional constructs -to cause assembly to fail if some condition that is known bad happens. +to cause assembly to fail if some condition that is known bad happens. Everything +from the directive to the end of the line is considered the error message. + + + + + +WARNING string + + +Causes a custom warning message to be printed at this line. This will not cause +assembly to fail. This directive is most useful inside conditional constructs +or include files to alert the programmer to a deprecated feature being used +or some other condition that may cause trouble later, but which may, in fact, +not cause any trouble. @@ -976,7 +1007,7 @@ will be used as the module name. -As of version 2.2, no supported output targets support this directive. +As of version 3.0, no supported output targets support this directive. @@ -1320,7 +1351,7 @@ -symEXTDEP +sym EXTDEP This directive forces an external dependency on diff -r 54499b799779 -r 62cb50c50976 lwasm/instab.c --- a/lwasm/instab.c Fri Jul 23 16:40:51 2010 -0600 +++ b/lwasm/instab.c Fri Jul 23 17:08:57 2010 -0600 @@ -249,6 +249,10 @@ #define pseudo_resolve_error NULL #define pseudo_emit_error NULL +extern PARSEFUNC(pseudo_parse_warning); +#define pseudo_resolve_warning NULL +#define pseudo_emit_warning NULL + extern PARSEFUNC(pseudo_parse_os9); #define pseudo_resolve_os9 NULL extern EMITFUNC(pseudo_emit_os9); @@ -587,6 +591,7 @@ { "align", { -1, -1, -1, -1 }, pseudo_parse_align, pseudo_resolve_align, pseudo_emit_align, lwasm_insn_normal}, { "error", { -1, -1, -1, -1}, pseudo_parse_error, pseudo_resolve_error, pseudo_emit_error, lwasm_insn_normal}, + { "warning", { -1, -1, -1, -1}, pseudo_parse_warning, pseudo_resolve_warning, pseudo_emit_warning, lwasm_insn_normal}, // these are *dangerous* { "ifp1", { -1, -1, -1, -1}, pseudo_parse_ifp1, pseudo_resolve_ifp1, pseudo_emit_ifp1, lwasm_insn_cond}, diff -r 54499b799779 -r 62cb50c50976 lwasm/pseudo.c --- a/lwasm/pseudo.c Fri Jul 23 16:40:51 2010 -0600 +++ b/lwasm/pseudo.c Fri Jul 23 17:08:57 2010 -0600 @@ -950,6 +950,12 @@ skip_operand(p); } +PARSEFUNC(pseudo_parse_warning) +{ + lwasm_register_warning(as, l, "User warning: %s", *p); + skip_operand(p); +} + PARSEFUNC(pseudo_parse_includebin) { char *fn, *p2;