shithub: rgbds

ref: c2ca46c27d622a17c6248782d628c89c49bfb972
dir: /test/asm/macro-arg-in-string.asm/

View raw version
print1: MACRO
	if _NARG == 2
		assert !STRCMP("\1", \2)
	endc
	PRINTLN "\1"
ENDM

	print1 John "Danger" Smith
	print1 \\\\A\\nB\n, "\\\\A\\nB\n"
	print1 C\
D
	print1 E\!F ; illegal character escape


iprint: MACRO
	PRINTLN "{\1}"
ENDM

s EQUS "hello"
	iprint s

symprint: MACRO
	PRINTLN {\1}
ENDM

hello EQUS "\"goodbye\""
	symprint s