Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mac2x

macrumors 65816
Original poster
Sep 19, 2009
1,146
0
Hi all,

I've become interested of late in obtaining a greater understanding of what goes on at the lowest levels of a computer. It seems that assembly is one place to do that.

I am quite aware that assembly is highly processor dependent. Since I merely want to learn the fundamentals, I don't need the head spinning processor manuals Intel offers. I'm thinking some kind of emulator.

I've been messing with emu8086 on windows, but it's shareware and I'd rather have something open source.

What do you guys recommend?


PS -- I've read Cromulent's thread from a few years ago already, but it did not answer my question.

PPS -- I am fairly competent with C, though by no means an expert. Just to give a little perspective on my skills. I've also been doing some C++ and C#, but haven't had much time for those due to other obligations.
 
This is just an idea that came to mind.

Donald Knuth's classic books The Art of Computer Programming are written in a factitious assembler called MIX. If you were to read these, you would not only get used to working in low-level assembler, you'll also gain some excellent (not so) ancillary knowledge as well.


There are other IA32/x86-64 emulators out there. QEMU http://wiki.qemu.org/Main_Page. Bochs http://bochs.sourceforge.net/


This book might interest you: http://www.amazon.com/Professional-Assembly-Language-Programmer/dp/0764579010

This is the book I learnt assembly programming from (back in the day): http://www.amazon.com/Assembly-Language-Primer-Personal-Computer/dp/0136619010


At Uni (a while ago), we learnt MIPS32 assembly using SPIM http://pages.cs.wisc.edu/~larus/spim.html. Seems to have been "superseeded" by MARS http://courses.missouristate.edu/KenVollmar/MARS/.
 
Last edited:
As an Amazon Associate, MacRumors earns a commission from qualifying purchases made through links in this post.
Wow, thanks for the suggestions!


Funny thing, I've been looking for an excuse to buy Knuth's books. Maybe a Christmas present for myself. =)

Looks like SPIM has a new version written with QT (QtSPIM); it looks pretty sharp.
 
I got my start to low level programming thru debuggers and reverse engineering. If you are a hands on kind of person, there are a lot of sites out there with sample simple applications and tutorials for debuggers such as Olly (Win 32,) etc.
 
Qemu is great, but I would not pick an x86 emulator, but something like Vice to emulate a c64 and 6502 with all system functionality memory mapped. :D
 
Just run XCode 4, set a breakpoint, turn on "Show Disassembly when debugging", and step through individual instructions.

And go to www.intel.com and download their processor manuals.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.