Gavin's Guide to 80x86 Assembly

Copyright (c) Gavin Estey, 1995, 1996. All rights reserved.

This was originally written for the Phil Inch's Game Developer's Magazine and after getting lots of positive feedback I expanded and improved it. I have spent a lot of time working on this and would appreciate hearing from you if you like it.

Here is some of the feedback I have recieved.

If you want to contact me then e-mail me at: gavin@senator.demon.co.uk or on CompuServe at 100767,1325

Useful Resources

There are several resources that you may find useful.
List of Instructions and timings
If you have TASM then the "Borland Turbo Assembler Quick Reference" has a list of instructions and timings up to 486. The "Intel Pentium Family User's Manual: Volume 3" is equally useful.

List of Interrupts
There are several books that have this information but the most up to date is Ralf Brown's Interrupt list available freely in four parts at:
ftp://x2ftp.oulu.fi/pub/msdos/programming/docs/interXX[a-d].zip
where XX is the version (go there).

A book that covers both these topics and is a useful assembly reference is:

The Revolutionary Guide to Assembly Language
Vitaly Maljugin, Jacov Izrailevich et al
Wrox Press
ISBN: 1-874416-12-5

Table of Contents

Part I - Introduction to the hardware

Overview of the 80x86 Family · Representation of numbers in binary · Registers · Segments and offsets · The Stack

Part II - An Introduction to Assembly Instructions

Push and Pop: Two Instructions to use the Stack · Types of Operand · Some Instructions that you will need to know · Your first assembly program · Compilation Instructions

Part III - Input and Control Flow

Making things easier · Keyboard Input · Printing a Character · Control Flow · Jump on Condition Instructions · Example Program

Part IV - Procedures and Macros

Some instructions that you need to know · Introduction to Procedures · Procedures that pass parameters · What are "Memory Models"? · Macros · Macros with parameters

Part V - Files

File Functions · How to save the file handle · Using the FindFirst and FindNext Functions

Part VI - Strings, Shifts and Debuggers

String Instructions · How to find out the DOS Version · Multiple Pushes and Pops · The PUSHA/PUSHAD and POPA/POPAD Instructions · Using Shifts for faster Multiplication and Division · Loops · How to use a debugger

Part VII - Writing to the Screen

More output in text modes · Mode 13h · First check that mode 13h is possible · Setting the Video Mode · Some Optimizations
Well that's it. I hope you enjoyed reading my tutorial and hopefully you learnt something. My tutorial is not quite finished. Some work needs to be done to Part VII and I would like to write chapters on using C with assembly and optimization. An index is also planned.

In the meantime you can contact me if you need any help.

Back to top