PC Assembly Tutorial Lesson 1
Updated 15th May, 2001
Hi! Welcome to x86 assembly lesson. This assembly lesson is for x86 specific, i.e. for Intel 8088, 80286, 80386, etc.
Yes, it is compatible with your Pentium or Pentium III. AMD users could also use this tutorial as well because I cover
only the basics. I assume that you have some grasp on some programming language like Pascal, C or C++. I don't want
to go over the basic concepts of programming all over again.
Note that you might be frustrated for not getting outputs printed on the screen. But
please be understand that it would involve a lot of basic instructions. So, my style here
is to churn out several chapters before doing output on the screen. I suggest you
to have a debugger like Turbo Debugger to directly watch the effect of each instruction. This
can be great for learning.
If you are impatient, just read preliminary chapter, chapter 1 and 2. Then skim chapter 3 through 7.
Chapter 8-13 lies the core lesson. If you miss anything, go back to the previous chapters.
This tutorial is available for download. Click here.
OK, here is the contents of the lesson:
- Preliminary lesson -- Low Level Basic Concepts
Talks about registers, flags, memory, stacks, and interrupts. Don't worry about
that too much. You might be confused with so many concepts. However, as you
follow the lesson, I think every concepts should be clear enough.
- Chapter 1 -- COM program structure
Begin your journey in assembly by observing the simplest program structure.
- Chapter 2 -- Variables in Assembly
Discover the unique concept of variables in assembly language. The
notion is far different than that of the normal high level programming
language. I also explain how mov instruction works.
- Chapter 3 -- Arithmetic Instructions
How can we perform some arithmetic in assembly? Click here
to find out.
- Chapter 4 -- Bitwise Logic, part 1
Using and, or, and xor to perform various logical
tasks, including bit masking and flipping.
- Chapter 5 -- Bitwise Logic, part 2
Bit shifting and rolling can be useful in aiding bit masking
set forth in the next chapter. Click to see how.
- Chapter 6 -- Branching
Branch is essential for all programs. Let's try some assembly
branching instructions to improve the logic of our programs.
- Chapter 7 -- Loop
The loop instruction in assembly can be useful to resemble
higher level programming language construct.
- Chapter 8 -- Interrupt Essentials
Using common system interrupt services to do screen output and takes input.
- Chapter 9 -- Stacks
Using push and pop and knowing how the stack behaves.
Some details about tiny memory mode is explained here.
- Chapter 10 -- Making Subroutines
Using subroutines to mimic structured programming approach.
- Chapter 11 -- Macros
Using macros.
- Chapter 12 -- Array Access
See how assembly provides a very crude array access instructions.
- Chapter 13 -- Basic String Instructions
Using various string instructions: movs, lods, cmps, scas,
and stos.
- Chapter 14 -- Structures
Using structures like the ones in high-level languages. The structure
in assembly is equivalent to struct in C/C++ and record in Pascal.
- Chapter 15 -- A Bit of Theory
Addressing modes and memory modes explained plus Computer Architecture 101.
Where to go now ?
Back to main tutorial page
Main tutorial page (framed version)
My programming links
Download this lesson
Write me
Roby Joehanes, © 1997, 2000, 2001