this masm's code :
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
.486
.model flat, stdcall
option casemap :none ; case sensitive
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\gdi32.inc
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\gdi32.lib
main PROTO
; ---------------------
; literal string MACRO
; ---------------------
literal MACRO quoted_text:VARARG
LOCAL local_text
.data
local_text db quoted_text,0
.code
EXITM <local_text>
ENDM
; --------------------------------
; string address in INVOKE format
; --------------------------------
SADD MACRO quoted_text:VARARG
EXITM <ADDR literal(quoted_text)>
ENDM
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
.code
start:
call main
invoke ExitProcess,0
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
main proc
invoke MessageBox,0,SADD("blabla 1"),SADD("hejka Privalov"),MB_OK
ret
main endp
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start
puts all te strings to data section and code to .text section.
How should be writen the fasm code to do not mixed .code and .data after:
invoke MessageBox,0,"asasdasda","ytutrutrytry",0
because mixed code with the data is unreadable after disassembling.
I see that Privalov used call-trick and put in fasm strings data after call instruction (which pushed eip into the stack to point it)
regards!
harry