flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > 1.70.01 fails on lea ecx,[$3fff+64-$3fff-(not 30 + 32)]

Goto page Previous  1, 2
Author
Thread Post new topic Reply to topic
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20445
Location: In your JS exploiting you and your system
revolution 06 Jul 2012, 12:55
It makes me wince to see this effect:
Code:
use16
x = not 0
lea ecx,[eax+not 0]   ;lea ecx,[eax+0xFFFF]
lea ecx,[eax+x]                ;lea ecx,[eax+0xFFFFFFFF]    
Post 06 Jul 2012, 12:55
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8359
Location: Kraków, Poland
Tomasz Grysztar 06 Jul 2012, 13:05
As the default context for address here is 16-bit, you get the result as if you defined x this way:
Code:
x = word not 0    

It is pretty straightforward, even if unexpected (at least until you know how it works).
Post 06 Jul 2012, 13:05
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:  
Goto page Previous  1, 2

< 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.