flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > lea - value out of range

Author
Thread Post new topic Reply to topic
hidden



Joined: 14 Feb 2007
Posts: 49
hidden 25 Apr 2007, 21:13
Code:
lea     ebx, [esp-0xB0000000] ; value out of range    
But in OllyDbg:
Code:
7C90124C 8D9C24 00000050  LEA     EBX, DWORD PTR [ESP+50000000]    

_________________
Image Lang: (eng|рус)
Post 25 Apr 2007, 21:13
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid 25 Apr 2007, 22:54
this is problem of point of view, not a "real" problem. As i see it, displacement is 32bit signed immediate, and -0xB0000000 doesn't fit into it.

It is something like wanting FASM to assemble "mov eax, 100000005h" to "mov eax, 5h".
Post 25 Apr 2007, 22:54
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
hidden



Joined: 14 Feb 2007
Posts: 49
hidden 26 Apr 2007, 02:25
I don't see anything useful in it, but if it's not a bug, it's ok, I'll do it this way Smile
Code:
        lea     ebx, [esp+((-0xB0000000)and 0xFFFFFFFF)]    
I just like to do something like this:
Code:
        or      al, 1
        and     al, not 1    
instead of this:
Code:
        or      al, 1
        and     al, 0xFE    
I think it looks more understandable. Smile

_________________
Image Lang: (eng|рус)
Post 26 Apr 2007, 02:25
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.