flat assembler
Message board for the users of flat assembler.
 Home   FAQ   Search   Register 
 Profile   Log in to check your private messages   Log in 
flat assembler > Compiler Internals > Error: Invalid address

Author
Thread Post new topic Reply to topic
l4m2



Joined: 15 Jan 2015
Posts: 605

Error: Invalid address


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
Assembly Artist


Joined: 16 Jun 2003
Posts: 6686
Location: Kraków, Poland


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: 15324
Location: Bigweld Industries

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: 605

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


Powered by phpBB © 2001-2005 phpBB Group.

Main index   Download   Documentation   Examples   Message board
Copyright © 2004-2017, Tomasz Grysztar.