delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/21/19:18:11

From: "M. Schulter" <mschulter AT value DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Why not build in inline 80x86 assembly, like in borland C
Date: 21 Oct 1997 19:03:04 GMT
Organization: Value Net Internetwork Services Inc.
Lines: 42
Message-ID: <62iu98$rfh$2@vnetnews.value.net>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 971019172327 DOT 27221W-100000 AT is>
NNTP-Posting-Host: value.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii <eliz AT is DOT elta DOT co DOT il> wrote:

: Well, I ``waste my time'' in a variety of ways, but none of them is
: because of the Gas syntax.  I actually find AT&T style to be better
: than Intel style.  Using the AT&T style actually saves some waste of
: time, because we need not bother writing a new assembler, we just use
: the GNU Assembler as is.

Hi, there.

Please let me add that as someone who is learning assembler for the first
time and has only been writing it for two months, I love the AT&T syntax.

One neat feature is that it looks like standalone GAS programs in DJGPP
which use C functions for i/o rather than MS-DOG specific interrupts might
run in Linux or Coherent, for example, with only a few changes.

Writing such standalone assembler programs is for me one of the high
points of DJGPP.

BTW, about a month ago, Eli advised that crt0.o would be the key to the
problem of standalone GAS programs. The solution of using C-style i/o and
assembling like this

gcc -o myprog.exe myprog.s

has proved him right.

There are a few differences between DJGPP and some other "Gintel"
environments (i.e. GAS + Intel i386). For example, a Linux "hello.s" seems
to use '.global main' instead of 'global _main', and there may be a
different convention in terms of restoring %ecx.

At any rate, portability issues aside, I find AT&T a user-friendly
standard. Of course, alternatives such as NASM meet some of the needs of
people with different tastes or problems to solve.

Most respectfully,

Margo Schulter
mschulter AT value DOT net

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019