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
- Write the frame of a program and print with INT 21h
- Use the registers and MOV and XCHG within their rules
- Define and read variables, and explain little-endian storage
Lessons
- 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
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
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
- Say it twiceEasy
- Greet by a letterMedium
- Three letters on three linesHard
- Swap two keysEasy
- Rotate three keysMedium
- The hex code of a keyHard
- A table in the data segmentEasy
- Bytes of a wordMedium
- Split a messageHard