flat assembler
Message board for the users of flat assembler.
Index
> Main > 0x80000000: "value out of range" in 64-bit mode. |
Author |
|
revolution 09 Aug 2012, 22:45
Indeed. 0x800000000 is 2^35. The x86 encoding mechanism for immediate values only allows 32-bit signed values with ADD in 64-bit mode.
|
|||
09 Aug 2012, 22:45 |
|
magicSqr 09 Aug 2012, 22:49
Thanks revolution.
I actually put too many zeroes in my OP, it's add rax, 0x080000000 i.e. a 32-bit number, although as a signed it is negative. I'll just use add rax, 0x7FFFFFFF inc rax or else place the value in memory and add it from there |
|||
09 Aug 2012, 22:49 |
|
revolution 10 Aug 2012, 00:54
Or you can use MOV.
Code: mov rcx,0x123456789abcdef0 add rax,rcx |
|||
10 Aug 2012, 00:54 |
|
LocoDelAssembly 10 Aug 2012, 15:32
Code: sub rax, -0x080000000 |
|||
10 Aug 2012, 15:32 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.