diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-03 14:31:20 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-03 14:31:20 -0700 |
commit | 4a532bc707280a0c8a1f9a0e276a4247fcddf9ea (patch) | |
tree | 9821cb0fa79b5744a2a310e281ceaa2f9d2b0864 | |
parent | fafb6a50e259fec2eeef5efde882e9cc324ff641 (diff) | |
download | nasm-4a532bc707280a0c8a1f9a0e276a4247fcddf9ea.tar.gz |
Document %unmacro
-rw-r--r-- | doc/nasmdoc.src | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/doc/nasmdoc.src b/doc/nasmdoc.src index 23c03907..cea7a6ec 100644 --- a/doc/nasmdoc.src +++ b/doc/nasmdoc.src @@ -2144,9 +2144,9 @@ instruction has been used as a label in older code. For example: \c %idefine pause $%? ; Hide the PAUSE instruction -\S{undef} Undefining Macros: \i\c{%undef} +\S{undef} Undefining Single-Line Macros: \i\c{%undef} -Single-line macros can be removed with the \c{%undef} command. For +Single-line macros can be removed with the \c{%undef} directive. For example, the following sequence: \c %define foo bar @@ -2713,6 +2713,30 @@ Or like this: \c %macro bar 1-5+.nolist a,b,c,d,e,f,g,h +\S{unmacro} Undefining Multi-Line Macros: \i\c{%unmacro} + +Multi-line macros can be removed with the \c{%unmacro} directive. +Unlike the \c{%undef} directive, however, \c{%unmacro} takes an +argument specification, and will only remove \i{exact matches} with +that argument specification. + +For example: + +\c %macro foo 1-3 +\c ; Do something +\c %endmacro +\c %unmacro foo 1-3 + +removes the previously defined macro \c{foo}, but + +\c %unmacro bar 1-3 +\c ; Do something +\c %endmacro +\c %unmacro bar 1 + +does \e{not} remove the macro \c{bar}, since the argument +specification does not match exactly. + \H{condasm} \i{Conditional Assembly}\I\c{%if} Similarly to the C preprocessor, NASM allows sections of a source |