nasm/test/macroerr.asm
H. Peter Anvin 3736895c07 Fix and clean up listing of macro expansion
Fix the printing of the macro stack: we need to follow the
mstk->next_active list, not mstk->next, and we need to reverse the
order so that the highest-level inclusion comes first.

Since this should be a rare or at least performance-insensitive
operation, do it using simple function recursion.

Finally, add an ellipsis before the "from macro" message; it greatly
enhances readability.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2016-05-09 14:10:32 -07:00

12 lines
117 B
NASM

%include "macroerr.inc"
%macro bluttan 1
mov eax,%1
blej %1
%endmacro
bluttan ptr
blej ptr
dd ptr, ptr
ptr: