flat assembler
Message board for the users of flat assembler.

Index > Heap > GAS vs FASM

Goto page 1, 2  Next
Author
Thread Post new topic Reply to topic
m



Joined: 28 Dec 2006
Posts: 304
Location: in
m
I compared the GAS with the FASM:

a + means GAS is better
a - means FASM is better

GAS features:

- High level macros.
- Syntax
- Produced Executable size efficiency
- Ease of coding
- Written by An Assembly Artist
- Huge fan following
- I appreciate

Based on above I think a guy like me deserves the GAS.
So, I will never use FASM, sorry Tomasz (Actually you would be happier).

By the way, does that in any way bar me from writing at this forum ?
Post 05 Jan 2007, 09:19
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Didn't you screw it up a little bit? Doesn't give sense, FASM is better in all areas, so you choose gas? is it some non-conformism or something? Wink

Quote:
By the way, does that in any way bar me from writing at this forum?
you are free to discuss other assemblers in Heap section.
Post 05 Jan 2007, 09:36
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
m



Joined: 28 Dec 2006
Posts: 304
Location: in
m
Coding in Assembly is Art
writing Assembly for GAS is more so.

If we are expected to get excited by Hi-Fi features than
C is better than Assembly, and so GCC better than FASM
C++ is better than C, and so G++ better than GCC
Java is better than C++, and so on for-ever . . .
Post 05 Jan 2007, 09:49
View user's profile Send private message Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
FASM features:

- High level macros.
- Syntax
- Ease of coding
- Written by An Assembly Artist
- Huge fan following
- I appreciate
- Selfcompilable

DJASM (half-baked, hated) features:

- Label listing

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 05 Jan 2007, 09:55
View user's profile Send private message Reply with quote
scientica
Retired moderator


Joined: 16 Jun 2003
Posts: 689
Location: Linköping, Sweden
scientica
I can think of one thing in favour of GAS (feels kinda like advocatus diabolis (what ever the latin) Wink)
+ More wide spreas across *nix
(imo, the AT&T syntax used (per default) in GAS is _horrible_, but that might just be learning intel-style first (can't seem to find any decent AT&T tut/description anywhere, it was may easier to find docs on eg nasm or masm when I started (otho, then I did win32 apps, and gas isn't the first thing you'd run on windows/dos)))
Post 24 Jan 2007, 08:55
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
AT&T syntax is horrible indeed... and I have this suspicion that it's partially caused by lazyness, as in "we don't want to write a semi-complex parser, so you gotta use specific variants like movl" et cetera.
Post 24 Jan 2007, 10:28
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
not "partially". think back to times it was created.
Post 24 Jan 2007, 11:27
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
tantrikwizard



Joined: 13 Dec 2006
Posts: 142
tantrikwizard
f0dder wrote:
AT&T syntax is horrible indeed... and I have this suspicion that it's partially caused by lazyness, as in "we don't want to write a semi-complex parser, so you gotta use specific variants like movl" et cetera.


Exactly, it is only easier to produce machine language from the syntax. Make the world learn a goofy syntax instead of writing an intellegent parser.
Post 24 Jan 2007, 14:49
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
There are still a few people who insist on using GAS for assembly (not only as GCC's backend), though. For instance, I just found out that UPX no longer uses YASM but GAS instead nowadays. I don't know the "real" reason or not, but I suspect it's because GAS is so widely available on *nix systems, etc.

P.S. UPX unstable 2.92 released! --ultra-brute takes 72 passes (on djgpp/coff or win32/pe, at least!). Guess I won't be using that switch very often. Laughing
Post 25 Jan 2007, 01:22
View user's profile Send private message Visit poster's website Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
m wrote:
Coding in Assembly is Art writing Assembly for GAS is more so.
scientica wrote:
can't seem to find any decent AT&T tut/description anywhere
fudder wrote:
AT&T syntax is horrible indeed...
tantrikwizard wrote:
Make the world learn a goofy syntax instead of writing an intellegent parser.
rugxulo wrote:

There are still a few people who insist on using GAS for assembly
One of them is Richard Blum, whose 2005 publication: "Professional Assembly Language", may address scientica's dilemma. It is published by Wiley/WROX. ISBN 0-764579010. Here's a quote, addressing some aspects of the comments above:
Richard Blum wrote:
One unique feature of GAS {GNU assembler} is its ability to create instruction codes for a platform other than the one you are programming on. (page 42)
The AT&T opcode syntax originated from AT&T Bell Labs, where the UNIX operating system was created. It was formed based on the opcode syntax of the more popular processor chips used to implement UNIX operating systems at the time....unfortunately, Intel chose to use a different opcode syntax. (page 49)
One feature of GAS which I prefer, is that it uses, as Blum explained, the OLDER cpu ideas, including the preferred notion, at least preferred to those of us accustomed to old things, Smile of using SOURCE, DESTINATION, rather than Intel's obtuse, arcane, and counterintuitive notion of destination first, then source. At least in English, maybe not in other languages, we explain our port of embarkation, prior to offering our place of destination, so I find GAS more intuitive, than Intel. Still difficult for me to read Intel code, what with all the xor's and @@@@@.
Confused
Post 25 Jan 2007, 03:32
View user's profile Send private message Reply with quote
OzzY



Joined: 19 Sep 2003
Posts: 1029
Location: Everywhere
OzzY
Quote:

P.S. UPX unstable 2.92 released! --ultra-brute takes 72 passes (on djgpp/coff or win32/pe, at least!). Guess I won't be using that switch very often.

Yeah. That's scary. The compression ratio seems good. But that 72 passes is slow. I was thinking of using this for my programs developed in RAD environments that generates big exes. But I think it'll be faster to code in ASM and don't compress at all, getting same or better result because of the optimized code. Laughing
Post 25 Jan 2007, 04:08
View user's profile Send private message Reply with quote
bogdanontanu



Joined: 07 Jan 2004
Posts: 403
Location: Sol. Earth. Europe. Romania. Bucuresti
bogdanontanu
And then again there are some peoples that insist on using TASM with @@ and mov dest, source ... someone like me for example Wink
Post 25 Jan 2007, 06:39
View user's profile Send private message Visit poster's website Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
Quote:
One feature of GAS which I prefer, is that it uses, as Blum explained, the OLDER cpu ideas, including the preferred notion, at least preferred to those of us accustomed to old things, Smile of using SOURCE, DESTINATION, rather than Intel's obtuse, arcane, and counterintuitive notion of destination first, then source. At least in English, maybe not in other languages, we explain our port of embarkation, prior to offering our place of destination, so I find GAS more intuitive, than Intel. Still difficult for me to read Intel code, what with all the xor's and @@@@@.
Confused

allright, read these for me:
Code:
andl %eax, %ebx
xorl %eax, %ebx
cmpl $5, %eax
$4(%eax, %ebx, $10)   ;THIS is readable???
;and this in FASM syntax only, no idea how to write them in AT&T syntax
mul eax, ebx, 10    


that with "readability" of instruction and src,dest syntaxes is bullshit. they always use just "mov" and "add" as examples, but in most cases ("xor", "and", "cmp") this syntax is completely unreadable.

And it's unsystematic for FPU (where dest,src is used even on at'n't), and for instructions with 3 arguments (no idea how they are done).
Post 25 Jan 2007, 07:39
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
IMHO "dst,src" makes perfect sense for mov and sub as well - consider this:
Code:
mov dst, src ; dst = src
sub dst, src ; dst -= src
    

Makes sense in a math sense as well, since that reads left-to-right.

But oh well, some people have a weird notion of what is readable and what isn't - Herbert Kleebaur/ALT.LANG.ASM, anyone? Smile
Post 25 Jan 2007, 09:45
View user's profile Send private message Visit poster's website Reply with quote
DOS386



Joined: 08 Dec 2006
Posts: 1901
DOS386
Quote:
IMHO "dst,src" makes perfect sense for mov and sub as well - consider this:

Code:
mov dst, src ; dst = src
sub dst, src ; dst -= src
    


Makes sense in a math sense as well, since that reads left-to-right.


"dst -= src" is HORRIBLE "C" syntax Sad

Quote:
Intel's obtuse, arcane, and counterintuitive notion of destination first, then source. At least in English, maybe not in other languages


Well, reveal me what "language" goes to destination place first when moving
and then to the source Shocked

_________________
Bug Nr.: 12345

Title: Hello World program compiles to 100 KB !!!

Status: Closed: NOT a Bug
Post 25 Jan 2007, 10:06
View user's profile Send private message Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
Whether something feels weird or not is the most of the times just a matter of habit.

As for the Intel's order of operands (which I am very used to), I notice one nice thing about it: since the destination operand always comes first (and since people usually align instruction and the operands in the two columns) you immediately see the operand ON which the operation is performed.
Post 25 Jan 2007, 10:12
View user's profile Send private message Visit poster's website Reply with quote
Tomasz Grysztar
Assembly Artist


Joined: 16 Jun 2003
Posts: 7724
Location: Kraków, Poland
Tomasz Grysztar
NTOSKRNL_VXE wrote:
Well, reveal me what "language" goes to destination place first when moving and then to the source Shocked

Well, even English... "Give ME something from YOU" Wink
(Or even: "reveal me what...") Wink
Post 25 Jan 2007, 10:15
View user's profile Send private message Visit poster's website Reply with quote
f0dder



Joined: 19 Feb 2004
Posts: 3170
Location: Denmark
f0dder
NTOSKRNL_VXE wrote:

"dst -= src" is HORRIBLE "C" syntax Sad

It's not horrible to me - wasn't hard figuring out what that meant when reading "foreign source", before I learned C. Pointer type declarations were (and still are, to a degree) horrible, though.

Well then, let's expand to a more RISCy syntax where destination register is specified...

Code:
SUB dst, op1, op2 ; dst = op1 - op2
    

Translating x86 "sub dst, src" into that would become...
Code:
SUB dst, dst, src
    


But of course destination is fixed on x86 Smile

I don't read source code as English. If you want that, don't do assembly, C, whatever, but do something BASIC - "let x = 10". Or we could invent new syntax, "10 -> x". I think I prefer "x=10" or "mov x,10", thankyou.

_________________
Image - carpe noctem
Post 25 Jan 2007, 10:16
View user's profile Send private message Visit poster's website Reply with quote
tom tobias



Joined: 09 Sep 2003
Posts: 1320
Location: usa
tom tobias
NTOSKRNL_VXE wrote:
Well, reveal me what "language" goes to destination place first when moving and then to the source

http://www.omniglot.com/writing/aramaic.htm
Hebrew, written right to left, is the language of Intel.
Tomasz wrote:
Well, even English... "Give ME something from YOU"
English, a mongrel language, is like the Bible: you can find whatever you want, if you keep looking.... As a native speaker, educated half a century ago, therefore probably completely out of touch with everyone else, may I suggest, only an opinion, not a fact, that it is natural to provide source, then destination. When we write:
"I am traveling to Krakow", it is IMPLICIT, that we are departing from Washington or Paris or Tokyo or wherever the speaker is currently residing. Here's the Polish Airlines reservation system:
http://www.lot.com/default.aspx?_lang=en&_cid=1013
If you ever visit an operating theatre for surgery, please note, the instruments are handed to the surgeon from a clean table, he or she then moves the tool with his or her hand to the patient. It is utterly illogical to imagine the instrument first in the patient, having arrived there by magic from the table.
Smile
Post 25 Jan 2007, 11:17
View user's profile Send private message Reply with quote
vid
Verbosity in development


Joined: 05 Sep 2003
Posts: 7105
Location: Slovakia
vid
tom: i am curious about your reaction to my "readability" points http://board.flatassembler.net/topic.php?t=6507#51893here[/url] in this thread
Post 25 Jan 2007, 11:25
View user's profile Send private message Visit poster's website AIM Address MSN Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  
Goto page 1, 2  Next

< 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 can attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.