flat assembler
Message board for the users of flat assembler.

Index > Main > Bug in lea? Concerning conversion to dword or byte

Author
Thread Post new topic Reply to topic
keenin



Joined: 25 Aug 2003
Posts: 33
keenin 02 Sep 2003, 23:44
Hi,


lea edx,[edi+0x81]
gets 8D97 81000000
also true for higher numbers

lea edx,[edi+0x71]
gets 8D57 71
also true for lower numbers

using FASM 1.49

Isn't it possible to convert 0x81 to a byte, too?
Post 02 Sep 2003, 23:44
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 03 Sep 2003, 12:53
No, because it's too large, such imm8 is sign-extended, not zero-extended.
Post 03 Sep 2003, 12:53
View user's profile Send private message Visit poster's website Reply with quote
keenin



Joined: 25 Aug 2003
Posts: 33
keenin 03 Sep 2003, 15:40
Thanks, I forgot that.
Post 03 Sep 2003, 15:40
View user's profile Send private message 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-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.