News:

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

qword argument

Started by vid, November 10, 2007, 04:59:00 PM

Previous topic - Next topic

vid

hi, if i wrote procedure that takes qword argument, should i declare it as qword:


writeq PROTO value:QWORD


or as two dwords?


writeq PROTO valuelow:DWORD, valuehigh:DWORD


First one seem more natural, but i don't know how to use registers in invoke.


value dq ?
...
invoke writeq, [value]
...
mov eax, dword ptr [value]
mov edx, dword ptr [value+4]
invoke writeq, edx:eax   ;  <--- how to do this???


If i use second version (two dwords), then i can do it:

value dq ?
...
invoke writeq, dword ptr [value], dword ptr [value+4]
...
mov eax, dword ptr [value]
mov edx, dword ptr [value+4]
invoke writeq, eax, edx


So, is there any way to use registers with first version of declaration, or should i stick to second version?

drizz

Quote from: vid on November 10, 2007, 04:59:00 PMSo, is there any way to use registers with first version of declaration, or should i stick to second version?
yes there is. use edx::eax
The truth cannot be learned ... it can only be recognized.

vid