flat assembler
Message board for the users of flat assembler.

Index > Windows > How do i Compile this in FASM ? [resolved]

Author
Thread Post new topic Reply to topic
packet_50071



Joined: 31 Oct 2007
Posts: 15
packet_50071
How do I use a code like this ??
Code:
mov eax, ds:[567]     


SryI cannot find the answer with the search Crying or Very sad


Last edited by packet_50071 on 02 Nov 2007, 21:49; edited 1 time in total
Post 01 Nov 2007, 23:39
View user's profile Send private message Reply with quote
MCD



Joined: 21 Aug 2004
Posts: 604
Location: Germany
MCD
either write
Code:
mov eax,[ds:567]    


or
Code:
ds
mov eax,[567]
    

How does it come that you need to specify "ds" in a windows program?
Usually, you don't need such under Windows and most other modern operating systems.
Post 02 Nov 2007, 00:06
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4633
Location: Argentina
LocoDelAssembly
And actually it is the default for the type of address, so you have to use the second variant proposed by MCD if you want to make a 6 bytes instruction.

BTW, where writing "ds" as instruction is documented on fasm manual?? It works of course but it is not documented as a valid prefix (and actually there is no section that lists all the prefixes in a table)...

It is also possible to write
Code:
ds mov eax, [567]    
Like rep prefix.
Post 02 Nov 2007, 00:19
View user's profile Send private message Reply with quote
packet_50071



Joined: 31 Oct 2007
Posts: 15
packet_50071
thx
I am reading the AOA e-book [ART of ASSEMBLY] which is written for MASM - so I just want to Make Sure I know the right format for fasm Smile
Post 02 Nov 2007, 21:04
View user's profile Send private message Reply with quote
Tomasz Grysztar



Joined: 16 Jun 2003
Posts: 7752
Location: Kraków, Poland
Tomasz Grysztar
LocoDelAssembly wrote:
BTW, where writing "ds" as instruction is documented on fasm manual?? It works of course but it is not documented as a valid prefix (and actually there is no section that lists all the prefixes in a table)...

It is also possible to write
Code:
ds mov eax, [567]    
Like rep prefix.

Oh, yeah, one more of the undocumented NASM legacies....
Post 02 Nov 2007, 21:43
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. Also on YouTube, Twitter.

Website powered by rwasa.