flat assembler
Message board for the users of flat assembler.

Index > Windows > MASM to FASM

Author
Thread Post new topic Reply to topic
clamicun



Joined: 04 Dec 2013
Posts: 77
Location: Muenster NRW Germany
clamicun
I am trying to "translate" a MASM program into FASM.
There are constructs which I definitely do not understand.
Any help -please - to understand this:

What does mean 'addr' (is it like offset ?)

And these constructs:

mov ecx,lParam
mov eax,(NMHDR ptr [ecx]).code
(I know the structure NMHDR is in user32,inc)


mov (TOOLTIPTEXT ptr [ecx]).lpszText,eax
Post 29 May 2014, 16:48
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
Code:
mov  ecx, [lParam]
mov  eax, [ecx+NMHDR.code]
mov  [ecx+TOOLTIPTEXT.lpszText], eax    
Post 29 May 2014, 19:04
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
clamicun



Joined: 04 Dec 2013
Posts: 77
Location: Muenster NRW Germany
clamicun
Dear JohnFound,
thank you very much for the answer.
Could you please give me some further info on what:

xxx.code

actually does mean?
Post 30 May 2014, 11:07
View user's profile Send private message Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
clamicun wrote:
Could you please give me some further info on what: xxx.code actually does mean?


Do you mean for example NMHDR.code? It is simply a label, defined by struct macro.
It consists of "main" label "NMHDR" and a "sublabel" (or local label) "code" separated by dot.
The value of this label is actually the offset of the field "code" inside the data structure NMHDR.
Particularly, NMHDR.code = 8; TOOLTIPTEXT.lpszText = 12; ECX points to the start of the data structure.

_________________
Tox ID: 48C0321ADDB2FE5F644BB5E3D58B0D58C35E5BCBC81D7CD333633FEDF1047914A534256478D9
Post 30 May 2014, 11:23
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
clamicun



Joined: 04 Dec 2013
Posts: 77
Location: Muenster NRW Germany
clamicun
Again thank you very much.
I get it now; the MASM file is full of those xxx.code constructions.
Have a good weekend down there at the black sea.
Post 30 May 2014, 17:15
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.