Learning 80×86 Assembly Language on Mac OS X

A bunch of the fixes necessary in order to get Mac Firefox running on Intel Macs are assembly code fixes. I don’t really know much about coding in assembly, so fortunately David Baron (Mozilla Corp.) and Eric Albert (Apple) have been helping out whenever assembly code needs to be written. The fixes are interesting to me, and I’d like to work on that code more, so I’ve decided to learn how to write 80×86 assembly code.

Step one was to get a book. After looking and asking around, I settled on Richard C. Detmer’s “80×86 Assembly Language and Computer Architecture.” While it covers some computer architecture stuff I already know, it is doing a great job of teaching me 80×86 assembly so far. I find it to be very readable, concise, and it explains bigger concepts and patterns in addition to serving as instruction documentation. Intel’s documentation is just a printed-off instruction reference, which isn’t all that helpful unless you already know how to write assembly pretty well.

One problem I have with Detmer’s book is that it uses Windows for its examples. Since all I ever do with Windows is look up books at public libraries, that isn’t too helpful. I found this document to get me going on Mac OS X.

4 thoughts on “Learning 80×86 Assembly Language on Mac OS X

  1. I’d bet money the previous commenter at one point in his life owned a TI-83(+) or a TI-84+ calculator. 🙂 I did some dabbling in Z80 assembler in the TI-83+ context several years ago, and it definitely was rather fun, in its own way.

    Anyway, back on topic: Josh, what assembler are you using, and what syntax does that assembler use? From what I hear Intel syntax is the mainstream syntax, but the assembler to which I have access (GNU as) has a rather different syntax. I don’t know what Apple plans to offer by way of assembler or compiler with Intel-based OS X; I’ve heard rumors they’re switching from GCC to an Intel compiler with Intel-based OS X, but that doesn’t seem like it would be any help to developers who’d have to make their code compile with different compiler without GCC’s extensions (should they be using them).

  2. Apple plans to ship gcc as far as I know. I don’t think there is any truth behind that rumor.

    I’m using gcc ‘as’.

  3. There is a new iBook for the iPad titled “CORE Assembly Language Programming for the Mac”. Hope this helps.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s