News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Sending mouse clicks to another window.

Started by Nilrem, May 04, 2005, 04:15:23 PM

Previous topic - Next topic

AeroASM

assume edx:ptr dword
LOWORD = word ptr [edx]
HIWORD = word ptr [edx+2]
mov eax,dword ptr [edx]
LOWORD = ax
No way to get the HIWORD unless you shr or ror!


Nilrem

I'm still a little confused. AeroAsm how could I move a certain value, say 100, to the LOWORD and HIWORD?

thomasantony

Hi Nilrem,
    Suppose you have a dword defined as my_dword.
So do

mov eax,OFFSET my_dword
mov word ptr[eax],100   ; put hundred in loword
mov word ptr[eax+2],200; 200 in high word

Or you could do this.

mov eax,200 ; put 200 in loword
shl eax,16     ; shift it into hiword
mov ax,100   ; now put 100 in loword
mov my_dword,eax ; put resultant value into variable.

I hope I have answered your question. If not makeit more clear :U

Thomas :U
There are 10 types of people in the world. Those who understand binary and those who don't.


Programmer's Directory. Submit for free

doomsday

Quote from: pbrennick0 and NULL are different?  That is certainly news to me!  I have always used them interchangeably?!?
In a theoretical sence NULL is an arbitary pointer value which means "not pointing to a valid object" and doesn't necessarily have to be the value 0.  Though, I've never seen a case where NULL != 0 either.  I point this out just on the off chance that someone designes an architecture who'se sole purpose is to make our lives suck. :)

regards,
-Brent




Nilrem

Please see:
http://www.masmforum.com/simple/index.php?topic=1557.15

I have no idea how I started two threads on the same subject, my apologies (yet again).