mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Macro arguments within a string literal are read into the string, not expanded
Fixes #643
This commit is contained in:
19
test/asm/macro-arg-in-string.asm
Normal file
19
test/asm/macro-arg-in-string.asm
Normal file
@@ -0,0 +1,19 @@
|
||||
print: MACRO
|
||||
PRINTT "\1"
|
||||
PRINTT "\n"
|
||||
ENDM
|
||||
|
||||
print John "Danger" Smith
|
||||
print \\A\nB
|
||||
print C\
|
||||
D
|
||||
print E\!F ; illegal character escape
|
||||
|
||||
|
||||
iprint: MACRO
|
||||
PRINTT "{\1}"
|
||||
PRINTT "\n"
|
||||
ENDM
|
||||
|
||||
s EQUS "hello"
|
||||
iprint s
|
||||
Reference in New Issue
Block a user