Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 26 May 1996 19:31:24 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-hackers@freebsd.org (FreeBSD hackers)
Subject:   Re: unix + asm
Message-ID:  <199605261731.TAA02680@uriah.heep.sax.de>
In-Reply-To: <199605261614.CAA31130@godzilla.zeta.org.au> from Bruce Evans at "May 27, 96 02:14:52 am"

next in thread | previous in thread | raw e-mail | index | archive | help
As Bruce Evans wrote:

> >Everything is just ``a bit different''.  The operators are in the
> >`right' order, i.e.
> 
> `wrong'
> 
> >	mov	$0, %eax	``move number 0 into register eax''
> 
> >as opposed to Intel (Microsloth?):
> 
> >	mov	eax, 0		``move eax into 0'' ??? :)
> 
> Intel.  Gas (AT&T?) (MIT?) order is only right if C order is wrong.

Depends on your point of view, of course.  For the Zilog `ld'
mnemonic, ``ld dst, src'' sounds more reasonable to me (``load the dst
with src.'').  For the Intel `mov' mnemonic, the other way round seems
better suited (``move src into dst.'').

> >#
> ># const char *
> ># btos (int b);
> >#
> ># /* Boolean to string */
> >#
> 
> `#' is a standard comment symbol (I think '/' works too), but it is best
> to usually use C comments, since `# if' is a cpp conditional, not a
> comment, and everything must be a cpp token.

This is only true for .S files which are preprocessed.  .s files are
being passed directly to the assembler.

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605261731.TAA02680>