From: Robert Plantz <plantz@sonoma.edu>
To: Only OpenSource <onlyopensource@gmail.com>
Cc: linux-assembly@vger.kernel.org
Subject: Re: which assembler to use : newbie query
Date: Mon, 31 Jul 2006 13:01:28 -0700 [thread overview]
Message-ID: <44CE6198.6040101@sonoma.edu> (raw)
In-Reply-To: <a779d4420607310812w3be15123ja4902cb19bdaea3b@mail.gmail.com>
Only OpenSource wrote:
> Hello all
>
> I want to learn assembly language properly so that I can understand
> FreeBSD assembly code.
> Which assembler do I need to use : as or nasm.
>
> Please help me out.
If you wish to understand code that others have written, I recommend
learning the assembler they have used. (I don't have my FreeBSD running
right now, so I don't know what is commonly used.)
If you wish to understand the assembly "underneath" the C code, I
think as is better. You can use the -S switch in gcc to see what it
generates. This is especially useful if you use embedded assembly
code. Also, at least in Linux, you can use the objdump program to
disassemble object files, and it does in in as syntax.
My opinions are based on my writing a lot of assembly language
in industry during the 70s and 80s. I also taught the subject at
the university level from 1983 - 2004. This last gig prompted me
to write a 400-page textbook on the subject. The book is based on
the premise that one should almost never write in assembly language,
but it's important to understand how computers work at that level.
Most of my examples are written in C, then show what gcc generates
(using -S), then how it would be written in assembly language (at
least, my way of writing it). I use as in my book.
next prev parent reply other threads:[~2006-07-31 20:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-31 15:12 which assembler to use : newbie query Only OpenSource
2006-07-31 17:01 ` leslie.polzer
2006-07-31 18:05 ` Ricardo Nabinger Sanchez
2006-07-31 20:01 ` Robert Plantz [this message]
2006-08-01 7:18 ` Hendrik Visage
2006-08-01 8:49 ` leslie.polzer
2006-08-02 14:43 ` Robert Plantz
2006-08-03 7:55 ` Maciej Hrebien
2006-08-01 22:17 ` Frank Kotler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44CE6198.6040101@sonoma.edu \
--to=plantz@sonoma.edu \
--cc=linux-assembly@vger.kernel.org \
--cc=onlyopensource@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).