mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
This way, if a child context initializes `\@`, the parent won't reset it. And if the child context did not initialize `\@`, then resetting it would be redundant.
34 lines
498 B
NASM
34 lines
498 B
NASM
MACRO m1
|
|
PRINTLN "Begin MACRO"
|
|
DEF nested EQUS """MACRO mm
|
|
PRINTLN "Within nested MACRO: \\@"
|
|
\n ENDM
|
|
mm"""
|
|
nested
|
|
PURGE nested, mm
|
|
PRINTLN "Within MACRO: \@"
|
|
ENDM
|
|
REPT 2
|
|
PRINTLN "Begin REPT"
|
|
m1
|
|
PRINTLN "Within REPT: \@"
|
|
ENDR
|
|
|
|
PRINTLN
|
|
|
|
MACRO m2
|
|
PRINTLN "Begin MACRO: \@"
|
|
DEF nested EQUS """MACRO mm
|
|
PRINTLN "Within nested MACRO: \\@"
|
|
\n ENDM
|
|
mm"""
|
|
nested
|
|
PURGE nested, mm
|
|
PRINTLN "Within MACRO: \@"
|
|
ENDM
|
|
REPT 2
|
|
PRINTLN "Begin REPT: \@"
|
|
m2
|
|
PRINTLN "Within REPT: \@"
|
|
ENDR
|