Original macro from the Masm32 package adapted to Poasm :
sas MACRO var,quoted_text:VARARG
LOCAL txtname
IFNDEF __UNICODE__
.data
txtname db quoted_text,0
align 4
.code
ELSE
.data
txtname dw quoted_text,0
align 4
.code
ENDIF
mov var,OFFSET txtname
ENDM
Example :
include sasMacro.inc
.code
start:
sas edx,"This is a test.", " Another test."
invoke StdOut,edx
invoke ExitProcess,0
END start
Macros split to handle ANSI and UNICODE strings:
sas MACRO var,quoted_text:VARARG
LOCAL txtname
.data
txtname db quoted_text,0
align 4
.code
mov var,OFFSET txtname
ENDM
sasw MACRO var,quoted_text:VARARG
LOCAL txtname
.data
txtname dw quoted_text,0
align 4
.code
mov var,OFFSET txtname
ENDM