From owner-freebsd-questions Mon Jun 12 5:40:28 2000 Delivered-To: freebsd-questions@freebsd.org Received: from fellspt.charm.net (fellspt.charm.net [199.0.70.29]) by hub.freebsd.org (Postfix) with ESMTP id 759F237CDBE for ; Mon, 12 Jun 2000 05:40:17 -0700 (PDT) (envelope-from dutch@charm.net) Received: from charm.net (coretel-185-195.charm.net [162.33.185.195]) by fellspt.charm.net (8.9.3/8.9.3) with ESMTP id XAA25745; Sat, 10 Jun 2000 23:18:16 -0400 (EDT) Message-ID: <3942F6EF.DBE42AB1@charm.net> Date: Sun, 11 Jun 2000 03:18:23 +0100 From: Dutch Collins X-Mailer: Mozilla 4.72 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Greg Lehey Cc: Willem Brown , Geoffrey Robinson , questions@FreeBSD.org, Miguel Lopes Santos Ramos Subject: Re: Learning Assembly References: <3942A886.2AF22D24@charm.net> <20000611005156.E209@denary.brwn.org> <20000611113503.C87130@wantadilla.lemis.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Greg Lehey wrote: > > On Sunday, 11 June 2000 at 0:51:56 +0200, Willem Brown wrote: > > On Sat, Jun 10, 2000 at 09:43:50PM +0100, Dutch Collins wrote: > >> Geoffrey Robinson wrote: > >>> > >>> I'm trying to learn assembly language for the enlightenment value. There > >>> is a lot of stuff out there but it is mostly DOS oriented. Can somebody > >>> please recommend an x86 assembly book for UNIX. > >>> > >>> Thanks > >>> > >> > >> I have programmed in Assembly for 20yr on all kinds of machines and > >> just plain 'clumps of chips' called machines so I am not an expert. I > >> have marked this for reading in the hope I get something from it. > >> > >> http://www.daemonnews.org/200006/assembly-intro.html > > > > I'm also going down that road, if I can find it. Anyways, I bought > > "Assembly Language Step-by-Step" 2nd ed. by Jeff Duntemann. > > ISBN 0-471-37523-3. It starts of with dos but does Linux assembly > > as well. And he uses NASM for both dos and Linux. > > I don't know NASM (or is that nasm?), but I assume it uses Intel > mnemonics. This won't help you too much when reading FreeBSD > assembly, which uses gas and the UNIX mnemonics (which, stupidly, > don't correspond to the Intel mnemonics). Take a look at > /usr/src/sys/i386/i386/locore.s for an example. > > I wish I could point to a good document on assembly under FreeBSD, but > unfortunately I don't know one. > > Greg > -- Miguel Lopes Santos Ramos make a good point about the use of Assembly and UNIX that I had not thought of. "I would remind you that programming assembly is totally system-dependent, so I don't think there is really a book like "Assembly Programming in the UNIX environment"... UNIX really was meant to be programmed in C." Recall I (dutch) said most of my time was spent in "chip-land" of bits&&bytes. So, I hunted through the book stack and dusted off, Advanced UNIX Programming Marc J. Rochkind copyright 1985, Prentice-Hall paperback ISBN: 0-13-011800-1 other ISBN: 0-13-011818-4 [note: Marc J. Rochkind, Advanced Programming Institute, Ltd. Put the name in google and see what the result is.] [note: Brian W. Kernighan, Advisor] It starts with the *basics* and as far as I know it is not dated material for learning. The book is about system calls using small c examples. Good Luck. -d -- +------------------------------------------------------------------+ | Stuff n. -trappings, essence, junk, things, gear | +------------------------------------------------------------------+ | My site full of Stuff : http://www.charm.net/~dutch | | #2 e-mail [servers do crash] : 2quasimoto@netscape.net | | | |$Id: overly-complex-sig.txt,v 1.0 2000/05/22 18:09:00 dutch Exp $ | +------------------------------------------------------------------+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message