flat assembler
Message board for the users of flat assembler.
Index
> Windows > some weird problem ?? with 64-bit windows programming & |
Author |
|
Tomasz Grysztar 02 Aug 2006, 09:41
weiss wrote: fasm doesn't seem to recognise r8d - r15d This was fixed in 1.66 weiss wrote: cmp qword [rsi+rax], 1234567812345678h The long mode instructions generally use simm32 in encoding, so you can use only 32-bit signed immediates that are sign-extended into 64 bits when executing the instruction. The only exception is the special case of MOV instruction, the "mov r64,imm64" form. So to compare a fully-qualified 64-bit values you have to do it like: Code: mov rbx,1234567812345678h cmp qword [rsi+rax],rbx weiss wrote: lso, why does an instruction like XOR ECX,ECX zero extend RCX? In AMD64/EM64T architectures any instruction that targets the 32-bit register, clears the upper 32 bit of the 64-bit register that contains it. This is a general rule, even the "xchg eax,eax" will clear the upper 32 bits of RAX register. I highly recommend spending some time on reading the AMD64 architecture manuals. |
|||
02 Aug 2006, 09:41 |
|
weiss 02 Aug 2006, 10:45
ok, Thomasz, sorry for silly questions,again.
thanks! |
|||
02 Aug 2006, 10:45 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.