Skip to main content
GameDev.net gamedev.net
🔒 Locked

Starting Assembly Programming

Started by PumpkinPieman Sep 14, 2006 at 3:33 PM 11 replies 2.5k views
Original Post
PumpkinPieman
PumpkinPieman
Well, a class of mine is going to be starting on some assembly programming and I want to get a good start on it. What type of resources do you guys suggest for this? As you can see the ASM book section is a little skimpy so a few names of some good books would be appreciated. Also what compilers would be good for a little Win32 ASM? Thanks a bunch.
Brocketino
Brocketino
Im using MASM32. Then you can google for simple assembler tutorials I think you can find a couple at the homepage for MASM.
raz0r
raz0r
You might find this and this useful.
Promit
Promit
The Art of Assembly is considered the standard online text on the matter, though last I looked it was still 16 bit.

Computer Organization and Design is the academic gold standard text. It's in MIPS rather than x86, and explains actual processor architecture; learning assembly is merely a side effect.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
drakostar
drakostar
I've used "Computer Organization and Design" too. I would really recommend that you don't start with i386 assembly. It's an absolute mess, including every feature that Intel and AMD thought they might want to tack on. Start with the old 32-bit MIPS architecture. You can use SPIM as an emulator.

Once you understand how a simple architecture works, you'll have a much easier time wrapping your head around i386. At least I did.
PumpkinPieman
PumpkinPieman
Thanks for all your replies and suggestions. A friend of mine who I asked before I posted this suggested MASM, and I've been playing with it. There is only one thing that I can't understand with it. I've been getting a few errors when following some GameDev tutorials. It seems MASM doesn't automatically setup it's installed libraries as default libraries, so if I have the program I'm working on anywhere but the main directory it won't find the library.

I'll take a look at "The Art of Assembly" after I figure out how to compile and link this simple program out. Thanks for those online resources. I may just buy the book anyway because I need to get away from the machine, otherwise my gaming temptress may swade my true intentions.

[Edited by - PumpkinPieman on September 14, 2006 8:59:38 PM]
Tachikoma
Tachikoma
I absolutely hated SPIM when I was required to learn it in uni classes many years ago. But then it's probably because I already knew i386 beforehand. IMO, it's probably better to teach yourself (or your students) to use actual tools.
Jockel
Jockel
For Win32Asm you should definitely have a look at Iczelions tutorials: http://win32assembly.online.fr/tutorials.html
And as an alternative to the MASM32 package (which is pretty good) you might have a look at NASM32: http://quasar.astalavista.ms/nasm32.html
TheAdmiral
TheAdmiral
The Art Of Assembly Language Programming is a fairly good resource, but in my opinion is highly overrated. The first few chapters are reasonably complete and well-written (albeit long-winded), but after a while, the book seems to turn into a sales pitch for Hyde's own assembler.

If I were to recommend a resource that needn't be available in hard-copy, I'd say Iczelion's pages are invaluable for everybody learning assembly language, particularly under Win32.

Regards
Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.
PumpkinPieman
PumpkinPieman
Alright, I'll start checking in to the stuff mentioned. Now how do different archetectures affect how I write my code? Or are we just talking about processor specific operations?
TheAdmiral
TheAdmiral
You should be sure of your target architecture before you choose the language. Although converting between different dialects of similar architectures often involves no more than a 'find & replace', more dramatic conversions can be the bain of a coder's life.

If you are developing a cross-platform program, you should avoid writing in assembly language. Platform independence is one of the main reasons C (and C++) was invented. However, if you're just setting out to learn ASM to expand your experience of low-level computing, then it really doesn't matter: Once you know ASM, coding for a new architecture from scratch is usually trivial.

My advice is to start off in common ground, using Intel x86, then when you need to go deeper, use whatever your processor likes.

Regards
Admiral
Ring3 Circus - Diary of a programmer, journal of a hacker.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.