flat assembler
Message board for the users of flat assembler.
Index
> Windows > 64BIT invoke? problem |
Author |
|
Chewy509 22 May 2007, 23:08
Code: mov rcx, [P] will work fine as long as P is within +-2GB of the function. (Displacements are still limited to 32bit even in Long Mode). However FASM doesn't know where 'P' will end up if 'P' is a global variable, it needs to use a 64bit space so that the address of 'P' can be inserted by your image loader. But since displacements are limited to 32bits, FASM will generate an error. (Can't load a 64bit value into a 32bit space). The only way to to load a register with the location of 'P' and pass the register to the function. eg Code: mov rax, P invoke Sleep, rax |
|||
22 May 2007, 23:08 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.