You use
name DB "Foo",0
to declare name to be the byte-string "Foo".
How do you declare it to be a word-string instead? (i.e. 16 bits per character)
Edit:
I’m looking for a method that works well inside macros, e.g.:
GenerateThunk macro Name
.code
&Name& proc public
push offset NAME
jmp &Name&__actual
NAME: ; I need something like this,
&Name&_Name dw "&Name&", 0 ; <--- but `dw' doesn't work!
&Name& endp
endm
You could do it with:
depending on the encoding you need.
Within a macro, you may be able to automate this with the
forcmacro, something like:I haven’t tried this since I don’t have access to MASM on my current box, so it may not work.