

Prerequisite for learning assembly - pencil

can someone tell me what's the prerequisite to learn x86 assembly language.
======
jacquesm
I'd start by buying a reference manual somewhere.

Then go and implement some algorithm that you can follow completely in C, and
use whatever flag your compiler uses to spit out the assembly code.

Then take that reference manual and go through the instructions one by one to
see how a stack frame is built up under the hood and how your algorithm was
translated from the high level 'readable' representation to the lego blocks of
assembler.

That should give you a bit of a start, after that when you think you have a
good enough understanding of how all that works try making that code faster.

For best understanding of the generated code and a fair chance at achieving
some optimization you should probably do all this with your compiler
optimizations off.

Good luck and have lots of fun, you will definitely benefit from learning
assembler.

edit: Make sure you take lots of time for this, learning assembler is not like
learning other languages, there are no friendly error messages, most of the
time what you write will produce an executable but it will crash horribly in
the beginning.

Single stepping through your code and watching the registers and flags change
is an invaluable tool.

I wished I had a half decent debugger when I first learned assembler, it would
have probably saved me a year.

------
intregus
Yeah, pretty much a desire to learn it and not get too frustrated if things
don't go your way at first. I'm still learning too, but there are some good
tutorials out there. Here are a few links:

<http://webster.cs.ucr.edu/AoA/> [http://dennishomepage.gugs-cats.dk/BASM-
filer/BASMForBeginne...](http://dennishomepage.gugs-cats.dk/BASM-
filer/BASMForBeginners.htm)

------
pencil
thank you so much for all your advice .i'am curious to know if companies like
microsoft and a couple of hardware companies still use it.

------
verec
a brain

------
J3L2404
UCBerkeley CS61C MIPS

[http://webcast.berkeley.edu/stream.php?type=download&web...](http://webcast.berkeley.edu/stream.php?type=download&webcastid=20770)

------
lacrossegm
asperger's syndrome?

<http://en.wikipedia.org/wiki/Asperger_syndrome>

lol j/k

