Programming the 8086/8088

Programming the 8086/8088

Recently I was looking at PCJs, which does a classic IBM PC simulation in your browser. In its Programming Guides list I discovered this book about the classic 8086: Programming the 8086/8088 by James W. Coffron. The first assembly language I learned almost two decades ago was the 8086. The x86 and x86-64 assembly language got so bloated and complicated after that. I picked up this book to relive that feel of a simple processor whose entire architecture and details you could actually comprehend.

This book seems to be meant for anyone with a bit of programming experience. The 8086 and 8088 architecture is introduced first, followed by details of its registers, instructions, memory model, I/O and how to program for it. There is a complete reference of its instructions, which are shockingly few in number for a CISC processor. It was quaint to see a listing of the number of cycles each instruction would take. (The fastest instructions took ~3 cycles and the slowest like integer division took hundreds of cycles.) Notably missing was floating point, which this early processor did not support, you had to use a math co-processor for that.

Studying the book I was reminded of how these Intel processors differed from others. The 8088 was introduced as a cheaper 8086. Both operated at 16-bit with 16-bit registers and a 20-bit address bus. The only difference was that 8088 had a 8-bit data bus and the 8086 had a 16-bit data bus. These processors supported another bygone relic: segmented memory. One of the segment registers holding a segment base address was right-shifted by 4 bits and added to offset address from another register to generate the 20-bit address. A final oddity was that 8086/8088 did not do memory mapped I/O, instead you used IN and OUT instructions to read from IO ports.

The book was pretty easy to follow along and covered both 8086 and 8088 well. Almost all aspects of the processors seem to be covered. What nagged me were several small mistakes that I could notice in the book. Maybe another round of proofreading would have helped. This book was easy, but I am still looking for the perfect 8086 reference.

Rating: 3/4 (★★★☆)

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.