[Warning: Long and only vaguely on-topic post ahead.  Proceed with caution.]

On Tue, 8 Jan 2002, Derek D. Martin wrote:
> Anyone know any good resources for x86 assembly in a Linux environment?
> Most of the stuff I've seen deals with MASM, which isn't terribly useful
> to me.

On Tue, 8 Jan 2002, Derek D. Martin wrote:
> ... want a better familiarity with assembly, and the x86 architecture ...

  I suspect this is going to open up a can of worms, but you might actually
be better off with MASM and a MS-DOS machine, then.  (I imagine OpenDOS or
FreeDOS and TASM would work just as well, if not better.)

  Why do I say this?  Well, I could draw on my extensive knowledge of
assembler programming -- if I had any.  Unfortunately, I don't.  I do,
however, have an over-stock in the bullsh*t department, so I'll give that
away for free.

  Linux, like any good OS, is designed to hide the underlying hardware
platform from you.  Even the kernel is designed to minimize
platform-specific code.  I've actually traced control flow in drivers for
Linux (to try and determine why said drivers were failing), and believe me,
I don't know squat about drivers or assembler -- but I do have an adequate
understanding of C, and that is what the drivers are written in.  True, I
had only a vague idea of what the code actually did, but I at least found
information that lead to solutions.  If the drivers were in assembler, I
would have been SOL.

  Sure, you can program regular user-mode programs in assembler under Linux.
I have had to do the same on Alpha/Digital Unix, for courses I was taking,
and let me tell you -- it is boring as hell.  The most important thing I
learned was an appreciation of compilers.  User-mode assembler programming is
grunt work, pure and simple.

  So, unless you want to dive into the guts of GCC (which, from what I
understand, has driven strong men into madness), I would guess Linux is a
poor choice to learn about assembler.

  Now, MS-DOS on the other hand, is a different story.  MS-DOS, despite the
name, is not an operating system.  I have best heard it described as a
"non-reentrant interrupt handler" [1] (although it does make a nice boot
loader for Linux).  MS-DOS did very little for you, and what little it did,
it did badly.  The end result was that to do anything useful, you generally
had to resort to assembler.  And since there was no annoying scheduler or
memory manager to get in your way, you could generally do whatever you
wanted.

  The end result being:  There is a wealth of information about hacking
MS-DOS -- in assembler -- to make it do things it was never meant to do
(like run programs, for instance).  I doubt you will find a more complete
library of literature on the subject for any other platform.  If your goal
really is to learn about x86 assembler and low-level machine organization, I
suspect you will find the most information there.

  If your goal is to learn about assembler strictly under the constraints of
Linux, the entire preceding sermon is invalidated, of course.  And there is
nothing wrong with that; it simply makes the available pool of literature
much smaller.

  And now, as a bonus to you, the reader, should you make it this far: I
have a copy of _Revolutionary Assembly Language_, by Maljugin, et. al., from
Wrox Press.  I have never used it; I bought it right before I met Unix, back
when MS-DOS still seemed like a viable platform to me [2].  I am willing to
offer it on indefinite loan [4] to anyone interested [5].  Reply privately
if you are.

Footnotes
---------
[1] I saw this in an Amiga FAQ; Google indicates one "Russell Williams".
[2] I was young and stupid.[3]
[3] No guarantees either condition has terminated.
[4] The only reason I impose even this lien is that the possibility exists
    that more than one person might want it.
[5] Should the need arise for determination: Derek gets first pick; after
    that, it is first come, first serve.

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or  |
| organization.  All information is provided without warranty of any kind.  |



*****************************************************************
To unsubscribe from this list, send mail to [EMAIL PROTECTED]
with the text 'unsubscribe gnhlug' in the message body.
*****************************************************************

Reply via email to