flat assembler
Message board for the users of flat assembler.

Index > Main > things we forget after a break in assembly coding...

Author
Thread Post new topic Reply to topic
sylware



Joined: 23 Oct 2020
Posts: 163
Location: Marseille/France
sylware
yeah, you know that:
Code:
mov rax, 0xeeeeeeeeeeeeeeee
or [ax|al], 1
    
will give you 0xeeeeeeeeeeeeeeef
but
Code:
mov rax, 0xeeeeeeeeeeeeeeee
or eax, 1    

will give you 0x00000000eeeeeeef
Post 01 Aug 2022, 13:07
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 18847
Location: In your JS exploiting you and your system
revolution
Yeah, an easy thing to forget, that all 32-bit register writes are zero extended to 64-bits.

But all 32-bit immediates are sign extended to 64-bits.
Post 01 Aug 2022, 13:13
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.