Learning Assembly

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

Learning Assembly

Postby PythonRulz » Mon Feb 05, 2007 8:26 pm

Ok, so I decided I want to learn assembly. What do I need to start writing programs with it? is there a good tutorial you recommend?

I am quite a confident programmer, I use C#, Python and C++ regularly
PythonRulz
 
Posts: 2
Joined: Mon Feb 05, 2007 8:24 pm

RE: Learning Assembly

Postby GMorgan » Mon Feb 05, 2007 8:32 pm

NASM is where it is at. All you need is that, VIM and the linker available in Linux as standard.

There is a book on it here for free

http://webster.cs.ucr.edu/AoA/index.html

I'd avoid HLA and focus on the real stuff. Perhaps give MikeOS a look (written by LXFs very own Mike Saunders).

The focus is very different in ASM to the languages you mention above. C is a decent abstraction but the others are a fair bit away.
GMorgan
LXF regular
 
Posts: 684
Joined: Thu Jan 12, 2006 6:58 pm
Location: South Wales, UK

RE: Learning Assembly

Postby M-Saunders » Tue Feb 06, 2007 9:52 am

As GMorgan says, NASM is the tool you want (to assemble your code into executable format). You don't have to use Vim -- I use Nano with some x86 syntax highlighting :-)

Try these tutorials:

http://asm.sourceforge.net/intro/Assembly-Intro.html

http://docs.cs.up.ac.za/programming/asm/derick_tut/

Those show you how to write assembly programs in Linux. You'll also need a general guide to x86 instructions; Wikibooks should get you started:

http://en.wikibooks.org/wiki/X86_Assembly

Good luck!

M
User avatar
M-Saunders
LXF regular
 
Posts: 2893
Joined: Mon Apr 11, 2005 12:14 pm

Postby insanefido » Tue Feb 13, 2007 11:48 pm

It was good to see an article on assembly coding in the magazine albeit a seemingly one off. It seems to be a sadly neglected art in the Linux world while undergoing a resurgence on the other major x86 OS. It is the only code I understand as those high level languages make my head spin.

The FASM and YASM assemblers are also worth checking out especially if you wish to code for AMD64 as NASM does not support this.
insanefido
 
Posts: 4
Joined: Tue Feb 13, 2007 11:36 pm
Location: The Mothership

Postby mjcpk » Thu Feb 15, 2007 10:56 pm

So, what's the deal with HLA? I've seen it touted as a really good way to learn Assembly but when I looked at a bit it didn't look nuffink like the stuff in Mikes tutorial...


..we fear that which we do not understand...I'm always scared!
mjcpk
 
Posts: 10
Joined: Thu Feb 01, 2007 12:24 am

Postby GMorgan » Fri Feb 16, 2007 11:58 pm

HLA is basically somebody taking a high level language and trying to call it ASM so people can claim to be writing that hard stuff. I'd avoid it, you're better off learning real ASM and then if you want a higher level approach to writing apps with some performance benefits use C and code the bottlenecks in pure ASM.
GMorgan
LXF regular
 
Posts: 684
Joined: Thu Jan 12, 2006 6:58 pm
Location: South Wales, UK


Return to Programming

Who is online

Users browsing this forum: No registered users and 0 guests