From owner-freebsd-hackers Sun May 26 11:21:41 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id LAA07486 for hackers-outgoing; Sun, 26 May 1996 11:21:41 -0700 (PDT) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id LAA07451 for ; Sun, 26 May 1996 11:21:31 -0700 (PDT) Received: from sax.sax.de by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id UAA02565 for ; Sun, 26 May 1996 20:21:22 +0200 Received: by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id UAA20049 for freebsd-hackers@freebsd.org; Sun, 26 May 1996 20:21:22 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.7.5/8.6.9) id TAA02680 for freebsd-hackers@freebsd.org; Sun, 26 May 1996 19:31:24 +0200 (MET DST) From: J Wunsch Message-Id: <199605261731.TAA02680@uriah.heep.sax.de> Subject: Re: unix + asm To: freebsd-hackers@freebsd.org (FreeBSD hackers) Date: Sun, 26 May 1996 19:31:24 +0200 (MET DST) Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) In-Reply-To: <199605261614.CAA31130@godzilla.zeta.org.au> from Bruce Evans at "May 27, 96 02:14:52 am" X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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. ;-)