Learn 8086 assembly by running it

The 8086 is where the PC began, and its instruction set is still at the heart of every x86 processor. This guide covers all of it: every instruction, how the addressing modes and the flags work, and the DOS, BIOS and mouse services a program calls through INT.

Nothing here is just written down. Every one of the 198 examples was assembled with MASM and run on a real DOS, and you can play it back one instruction at a time: the line about to run, the registers and flags, the memory the program reads and writes, what it prints. Press ▷ on any example and watch the machine work.

When you want to write your own, sign in for a DOS machine in the cloud with MASM, Turbo C and QuickBASIC, an editor, and a debugger that shows the CPU and memory as your program runs.

Instructions

The 8086 instruction set, grouped the way the Intel manuals group it, with the topics around it: registers, addressing, segments, the assembler's directives.

Interrupts

The services a DOS program calls: INT 21h for DOS, the video, keyboard, disk and timer BIOS, the mouse driver, and the hardware interrupts behind them.