News:

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

Type indicators

Started by ecube, June 04, 2010, 01:06:03 PM

Previous topic - Next topic

ecube

i've read previous posts on 32bit/64bit in harmony code, and I didn't find the answer for my issue below

Testf FRAME a1

cmp [a1],5    <-----------this needs a size indication infront(Q,D) etc...
ENDF

I want to use this function for both 64bit and 32bit, short of using the #IF stuff and writing the function twice, any other way?

1rDirEctoALgran0

I think to a possible usage of the S variable.
I don't remember if there is a better way to manage 32/64-bit... :red

cmp S[a1],5

Of course the S must be initialized.


Patrick

wjr

Similar to S, I believe another variable P is in the works for such a case:
http://www.masm32.com/board/index.php?topic=13127.0

Another way, depending upon register availability and other optimization issues, would split things up with:

mov rax,[a1]
;
;
cmp rax,5