Computer & Interfacing Chapter Three
Computer & Interfacing Chapter Three
HAWASSA CHAPTER
UNIVERSITY
INISTITUTE OF TECHNOLOGY
DEPARTMENT OF ELECTRICAL AND COMPUTER
ENGINEERING
CHAPTER THREE
Intel 8086 PROCESSOR PROGRAMING & INSTRUCTION SETS
BY NIGATU A.
Hu, Institute Of Technology Department Of Electrical And Computer Engineering
1
INTRODUCTION
The 8086 has about 117 different instructions with about 300
opcodes.
The 8086 instruction sets can contain no operand, single operand,
and two operand instructions.
The 8086 instructions do not permit memory to memory operations
except for string instructions which involve array operations.
The processor can access memory in different ways that are
collectively called addressing mode.
The addressing modes describe the types of operands and the way
they are accessed for executing an instruction.
The number of addressing modes is determined when the
microprocessor is designed and cannot be changed.
The mnemonic opcodes are ADD and MOV, and "AL, BL" and
"AX, 6764" are the operands.
Instead of a mnemonic and operand, these fields could contain
assembler pseudo-instructions, or directives.
Directives do not generate machine code and are used only by the
assembler as opposed to instructions.
Hu, Institute Of Technology Department Of Electrical And Computer Engineering
20
DIRECTIVES AND A SAMPLE PROGRAM
Examples of directives are DB, PROC, END, and ENDP.
Immediately after PROC, the ASSUME directive, associates segments with specific
registers.
By assuming the segment register is equal to the segment labels used in the
program.
If an extra segment had been used, ES would also be included in the ASSUME
statement.
ASSUME tells the assembler which of the segments, defined by SEGMENT,
should be used.
Also helps the assembler to calculate the offset addresses from the beginning
of that segment.
Hu, Institute Of Technology Department Of Electrical And Computer Engineering
60
FULL SEGMENT DEFINITION
In "MOV AL, [BX] " the BX register is the offset of the data segment.
On transfer of control from OS to the program, of the three segment
registers, only CS and SS have the proper values.
The DS value (and ES) must be initialized by the program
Solution: