Copyright (C) 2000-2012 |
GNU Info (nasm.info)Section 4.74.7. The Context Stack ====================== Having labels that are local to a macro definition is sometimes not quite powerful enough: sometimes you want to be able to share labels between several macro calls. An example might be a `REPEAT' ... `UNTIL' loop, in which the expansion of the `REPEAT' macro would need to be able to refer to a label which the `UNTIL' macro had defined. However, for such a macro you would also want to be able to nest these loops. NASM provides this level of power by means of a _context stack_. The preprocessor maintains a stack of _contexts_, each of which is characterised by a name. You add a new context to the stack using the `%push' directive, and remove one using `%pop'. You can define labels that are local to a particular context on the stack.
automatically generated by info2www version 1.2.2.9 |