News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

RR:RECT

Started by shankle, June 16, 2014, 06:40:36 AM

Previous topic - Next topic

shankle

To the best of my knowledge RR:RECT is 4  Double Word fields.
In my program holdright, holdleft, holdtop and holdbottom are defined
as Q words. How can I resolve this problem?
Thanks for any help.

Yuri

Use the low dwords of them? :icon_rolleyes:

jj2007

Or define them as DWORDs? After all, it's your own code.

dedndave

i would think the 64-bit include files take care of that for you ?

shankle

Being that I have no control over RECT, maybe it can be solved this way
in 64-bit GoAsm.

    holdleft   dq  0
    xor rax, rax
    mov eax, [RR,left]
    mov Q[holdleft], rax

qWord

Quote from: shankle on June 17, 2014, 02:49:30 AM
Being that I have no control over RECT
You should define holdright, holdleft, holdtop and holdbottom as DWORDs!

Quote from: shankle on June 17, 2014, 02:49:30 AMmaybe it can be solved this way
in 64-bit GoAsm.

    holdleft   dq  0
    xor rax, rax
    mov eax, [RR,left]
    mov Q[holdleft], rax

The RECT members are signed and you may better use MOVSXD for conversion.
MREAL macros - when you need floating point arithmetic while assembling!

shankle

Now I am really confused.
In the past I have been coding hard addresses in textout, rectangle, bitblt etc.
Now I am tying to put variable addresses in those fields.
That means I am trying to use 64-bit values.
That's why I felt I needed a 64-bit holdleft, holdright, holdtop and holdbottom.
From what you guys are saying this is not possible. BUT it's supposed to be
a 64-bit program. That means to me that 64-bit programs have a ton of
32-bit stuff in them....

qWord

Only pointer types (handles are also pointer types!) need to be 64 bit width. If you are not sure about the size of a specific type, look up the definition in windows SDK headers (or msdn).
Generally, it is wise to use 32 bit instruction when possible, because these have a shorter encoding (with a few exceptions of course).
MREAL macros - when you need floating point arithmetic while assembling!