flat assembler
Message board for the users of flat assembler.

Index > Main > How would I do this: "rep movsd fs:"

Author
Thread Post new topic Reply to topic
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Little question here, how would I do this
Code:
rep movsd fs:    
in fasm?

_________________
Gimme a sledge hammer! I'LL FIX IT!
Post 10 May 2012, 00:14
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
Very Happy...


Last edited by typedef on 10 May 2012, 01:13; edited 2 times in total
Post 10 May 2012, 01:06
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
Like this is one way:
Code:
rep fs movsd    
Post 10 May 2012, 01:08
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
revolution wrote:
Like this is one way:
Code:
rep fs movsd    

Allright, yeh, I was using the colon.
Quote:
typedef: Very Happy
Question

_________________
Gimme a sledge hammer! I'LL FIX IT!
Post 10 May 2012, 01:44
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
madmatt wrote:
revolution wrote:
Like this is one way:
Code:
rep fs movsd    

Allright, yeh, I was using the colon.
Quote:
typedef: Very Happy
Question


I wrote this
typedef wrote:

fs: what ?

and I thought it was harsh and you'd seen the post so I edited my post. Sorry for that.
Post 10 May 2012, 01:50
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7721
Location: Kraków, Poland
Tomasz Grysztar
revolution wrote:
Like this is one way:
Code:
rep fs movsd    
This is not an official way, though. See section 2.1.8 of the manual.
Post 10 May 2012, 08:50
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
Tomasz Grysztar wrote:
revolution wrote:
Like this is one way:
Code:
rep fs movsd    
This is not an official way, though. See section 2.1.8 of the manual.


I don't see anything about a segment override though, just this
Code:
movsd                      ; transfer double word    

_________________
Gimme a sledge hammer! I'LL FIX IT!
Post 10 May 2012, 12:20
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
The manual show an SS override:
Code:
movs word [es:di],[ss:si]  ; transfer word    
Just replace: word with dword - di with edi - si with esi - ss with fs.
Post 10 May 2012, 12:24
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7721
Location: Kraków, Poland
Tomasz Grysztar
section 2.1.8 wrote:
Full form of string operation needs operands providing the size operator and the memory addresses, which can be SI or ESI with any segment prefix, DI or EDI always with ES segment prefix.
Post 10 May 2012, 12:47
View user's profile Send private message Visit poster's website Reply with quote
bitshifter



Joined: 04 Dec 2007
Posts: 764
Location: Massachusetts, USA
bitshifter
revolution wrote:
The manual show an SS override:
Code:
movs word [es:di],[ss:si]  ; transfer word    

Hmm, now you got my attention...
I am studying opcoding myself here.
Seems like mov m16/m16 which i thought doesnt exist.
Now i need to figure it out for myself by decoding...

PS: Hello to my fasm friends, i have been idle for quite some time Smile

_________________
Coding a 3D game engine with fasm is like trying to eat an elephant,
you just have to keep focused and take it one 'byte' at a time.
Post 09 Jun 2012, 13:54
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17270
Location: In your JS exploiting you and your system
revolution
bitshifter wrote:
Seems like mov m16/m16 which i thought doesnt exist.
I doesn't exist. Only movs can do mem/mem transfers using fixed source and destination registers and a fixed count register with the rep prefix.
Post 09 Jun 2012, 14:04
View user's profile Send private message Visit poster's website Reply with quote
edfed



Joined: 20 Feb 2006
Posts: 4237
Location: 2018
edfed
very good information. i remember it is evocated somewhere in fasm manual, but it is not highlighted that much.

i wonder if that a generic segment override applyable to every string operations that way.
Post 09 Jun 2012, 14:39
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:  


< 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-2020, Tomasz Grysztar.

Powered by rwasa.