flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
Tomasz Grysztar 07 Jan 2006, 13:57
In long mode 32-bit values are sign-extended into 64 bits when pushed, thus PUSH instruction with 0F0000000h immediate does push the 0FFFFFFFFF0000000h value on the stack. If you do PUSH 0FFFFFFFFF0000000h, fasm will generate the proper opcode, but if you want to push actually the 0F0000000h, it's impossible this way, since it doesn't fit in the signed 32-bit immediate range. Thus you should do it rather this way:
Code: mov eax,0F0000000h ; this does the zero-extension to RAX push rax |
|||
![]() |
|
alorent 07 Jan 2006, 19:50
Thanks again Tomasz, you are my hero!
![]() |
|||
![]() |
|
vid 10 Jan 2006, 05:11
and designer of this 64bit extension isn't my hero
|
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.