hello, I have a macro like this for creating text strings and moving them into registers / pushing them onto the stack:
TEXT macro pszText:VARARG ; Macro for creating text strings
local szText
.const
szText db pszText,0
.code
exitm <offset szText>
endm
How can I make a custom label in my program where all the data will fall under, instead of .const?
For example, normally if I do:
invoke MessageBoxA,0,TEXT("TEST"),TEXT("TEST!!"),0
my .const section will have
"TEST",0
"TEST!!",0
I want the text to appear under a user defined label, for instance:
.code
start:
invoke MessageBoxA,0,TEXT("TEST"),TEXT("TEST!!"),0
invoke ExitProcess,0
ConstantStrings: ;<-- strings should appear under here
;other data is here
Hi,
it has to be done this way then:
.386
.model flat, stdcall
option casemap:none
option dotname
TEXT macro s
local xxx
.code .text$2
xxx db s,0
.code
exitm <offset xxx>
endm
.code .text$2
StartStrings:
.code
start:
mov eax, TEXT("abc")
mov ecx, TEXT("def")
ret
end start