I am performing some test on masm . The following is to generate a macro within a macro.


.586
.model flat, stdcall
option casemap: none

aa macro
@CatStr(<ddd>, <M macro>)
@CatStr(<endm>,<>)
endm

.code
start:
aa
end start


However i got an error. Could anyone help me to resolve what problem is? Thanks

test.asm(35) : fatal error A1008: unmatched macro nesting
aa(3): Macro Called From
test.asm(35): Main Line Code

Make error(s) occured.
Posted on 2003-01-06 03:58:16 by yoursguideline
The MACRO/ENDM keywords need to be outside of the @CatStr because of the way MASM scans the code - otherwise it is unable to 'see' the macro on the first pass.
aa macro

@CatStr(<ddd>, <M>) MACRO
endm
endm
Posted on 2003-01-06 08:37:37 by bitRAKE