flat assembler
Message board for the users of flat assembler.

Index > Compiler Internals > Error: Invalid address

Author
Thread Post new topic Reply to topic
l4m2



Joined: 15 Jan 2015
Posts: 674
l4m2 27 Jul 2016, 17:31
Code:
stos word[ds:di]    
1.71.39
Post 27 Jul 2016, 17:31
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 8356
Location: Kraków, Poland
Tomasz Grysztar 27 Jul 2016, 18:03
Intel® 64 and IA-32 Architectures
Software Developer’s Manual wrote:
STOS/STOSB/STOSW/STOSD/STOSQ—Store String
(...)
The destination operand is a memory location, the address of which is read from either the ES:EDI or ES:DI register (depending on the address-size attribute of the instruction and the mode of operation). The ES segment cannot be overridden with a segment override prefix.
Post 27 Jul 2016, 18:03
View user's profile Send private message Visit poster's website Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 20422
Location: In your JS exploiting you and your system
revolution 27 Jul 2016, 20:42
l4m2: That code won't work on any x86 processor. It is a limitation of the CPU. Be thankful that fasm saved you from some hours of debugging.
Post 27 Jul 2016, 20:42
View user's profile Send private message Visit poster's website Reply with quote
l4m2



Joined: 15 Jan 2015
Posts: 674
l4m2 28 Jul 2016, 01:09
Uh-uh. I found a lot of document only say that STOSX stores acc into [(E/R)DI]. Maybe we now use more in flat mode and no need to care about segments Smile
Thanks for your reply
Post 28 Jul 2016, 01:09
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.