The frame, registers and variables

The shape of an 8086 program, the registers and the rules of MOV and XCHG, and how variables, strings and arrays are defined in the data segment.

About 8 hours of study

Learning objectives

Lessons

  1. 1

    Your first 8086 program

    What the 8086 is, the shape every program has (.MODEL, .DATA, .CODE and MAIN PROC), and how a program prints a character and a message with INT 21h.

  2. 2

    Registers and MOV

    The 8086's registers and what each is for, numbers in hex and binary, and MOV, the instruction that copies a value, with the rules it must follow.

  3. 3

    Variables and the data segment

    Defining bytes, words, strings and arrays with DB, DW, DUP, ? and EQU; where each variable sits in memory; why words are stored low byte first; and the difference between a variable's address and its value.

Module practice

Module quiz

1. Which register holds the number of the INT 21h service?
2. AX = 1234h. What is in AH?
3. Which of these instructions does the 8086 not have?
4. W DW 0A1B2H is at offset 0. Which byte is at offset 1?
5. BX = 1111h and AX = 2222h. What is BX after XCHG AX, BX?
6. MSG DB 'Hi', 0DH, 0AH, '$' is followed at once by LEN EQU $ - MSG. What is LEN?

Arithmetic, flags and input and output ›