Hi there,
I am wondering how I can load a register with a pointer to some text. I want to display certain text given certain conditions.
Here is what I have. I think I am close, but it wont compile.
.data
TextCondition1 db "Condition 1",0
MsgBoxCaption db "Information",0
.code
start:
mov [ebx],TextCondition1
invoke MessageBox,NULL,ebx,addr MsgBoxCaption,MB_ICONINFORMATION
invoke ExitProcess,NULL
end start
The problem is at the mov [ebx],TextCondition1 line.
Any guidance would be much appreciated. :bg
mov ebx,OFFSET TextCondition1
Less common:
lea ebx,[TextCondition1]
Excellent. That is exactly what I was after. :8)
I'll have to look up my opcodes to see what LEA does.
Thanks for your help.