Chapter 7. Following Your Instructions

Meeting Machine Instructions Up Close and Personal

As comedian Bill Cosby once said: I told you that story so I could tell you this one.... We're over a third of the way through this book, and I haven't even begun describing in detail the principal element in PC assembly language: the x86 instruction set. Most books on assembly language, even those targeted at beginners, assume that the instruction set is as good a place as any to start their story, without considering the mass of groundwork without which most beginning programmers get totally lost and give up.

Orientation is crucial. That's why I began at the real beginning, and took 200 pages to get to where the other guys start.

Keep in mind that this book was created to supply that essential groundwork and orientation for your first steps in the language itself. It is not a complete course in PC assembly language. Once you run off the end of this book, you'll have one leg up on any of the numerous other books on assembly language from this and other publishers.

And it's high time that we got to the heart of things, way down where the software meets the silicon.

Build Yourself a Sandbox

The best way to get acquainted with the x86 machine instructions is to build yourself a sandbox and just have fun. An assembly language program doesn't need to run correctly from Linux. It doesn't even need to be complete, as programs go. All it has to be is comprehensible to NASM and the linker, and that in itself ...

Get Assembly Language Step-by-Step: Programming with Linux®, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.