flat assembler
Message board for the users of flat assembler.

Index > Main > preprocesser directives (AT&T syntax vs FASM)

Author
Thread Post new topic Reply to topic
royce



Joined: 01 Sep 2012
Posts: 7
royce
I guess I must have overlooked the info on the preprocessor directives
Primarilly interested in one to change the syntax of operands.
source first, destination second
Royce
Post 02 Sep 2012, 00:22
View user's profile Send private message Reply with quote
freecrac



Joined: 19 Oct 2011
Posts: 117
Location: Germany Hamburg
freecrac
I search for parameter order and it seems to be there is no direcrive to specify the parameter order for to switch to the AT&T syntax. But i am not sure.

https://secure.bluehost.com/~flatasse/subdomains/board/topic.php?p=82490

http://en.wikipedia.org/wiki/X86_assembly_language
Quote:

AT&T Syntax
Parameter order: Source before the destination.

Intel Syntax
Parameter order: Destination before source.

Dirk
Post 04 Sep 2012, 17:59
View user's profile Send private message Send e-mail Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
There is no such directive in FASM. I know only one assembler that supports AT&T syntax - GAS and it was forced to support Intel syntax, because no one liked AT&T. Very Happy
Post 05 Sep 2012, 06:34
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17251
Location: In your JS exploiting you and your system
revolution
JohnFound wrote:
... because no one liked AT&T. Very Happy
Hehe, people don't like AT&T (the company)?

And the asm syntax that AT&T designed is also an abomination for humans to read.
Post 05 Sep 2012, 06:42
View user's profile Send private message Visit poster's website Reply with quote
JohnFound



Joined: 16 Jun 2003
Posts: 3500
Location: Bulgaria
JohnFound
The only thing I know about AT&T is that they invented stupid x86 assembly syntax and somehow succeeded to promote it to the Unix world, thus making assembly programming for Unix and Linux really hard for many years.
Post 05 Sep 2012, 07:18
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
AT&T sucks dick. Their internet is a piece of shit and they are fucking scammers. Money hungry bitches. fuck them all.
Post 05 Sep 2012, 08:03
View user's profile Send private message Reply with quote
royce



Joined: 01 Sep 2012
Posts: 7
royce
This line of text comes from fasm.txr:
Flat assembler by default uses the Intel syntax for
the assembly instructions, although you can customize
it using the preprocessor capabilities
(macroinstructions and symbolic constants).
Implying that there is a directive/macro or someway to switch it.
Royce
Post 05 Sep 2012, 09:44
View user's profile Send private message Reply with quote
revolution
When all else fails, read the source


Joined: 24 Aug 2004
Posts: 17251
Location: In your JS exploiting you and your system
revolution
Here you go:
Code:
irp op,mov,add,sub,xor { ; <--- add more opcodes here
    macro op source,dest \{
               op dest,source
      \}
}    
You can extend the opcode list for whatever you need.
Post 05 Sep 2012, 09:56
View user's profile Send private message Visit poster's website Reply with quote
royce



Joined: 01 Sep 2012
Posts: 7
royce
Thanks for the code.
Royce
Post 06 Sep 2012, 00:38
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-2020, Tomasz Grysztar.

Powered by rwasa.