8086 Architecture
8086 Architecture
EXECUTION UNIT
The EU contains; an arithmetic and logic unit, flag register, an instruction register, temporary
register (not accessible to the programmer), EU control unit and a register array
The purpose of the EU is to carry out instructions that are fetched from the pre fetch queue.
The instruction register receives the instructions from the pre fetch queue. From here these
instructions are decoded by the instruction decoder and the decoded information is sent to
control circuit to direct the operation of the execution unit.
The register (AX, BX, CX, DX ) array holds information temporarily. It also contains
pointers(SP and BP) or index registers(SI and DI) used to address operand data located in the
memory.
The ALU performs arithmetic and logic operations on memory and or register data
Flag register
* Overflow Flag (OF) - set if the result is too large positive number, or is too small negative number to
fit into destination operand. (range -128 to +127 for bytes and -32768 to+32768 for words)
* Direction Flag (DF) - if set then string manipulation instructions will auto-decrement index registers.
If cleared then the index registers will be auto-incremented.
* Interrupt-enable Flag (IF) - setting this bit enables INTR interrupt.
* Single-step Flag (TF) - if set then single-step interrupt will occur after the next instruction, useful for
program debugging
* Sign Flag (SF) - set if the most significant bit of the result is set.
* Zero Flag (ZF) - set if the result is zero.
* Auxiliary carry Flag (AF) - set if there was a carry from or borrow to bits 0-3 in the AL register.
* Parity Flag (PF) - set if parity (the number of "1"s) of the result is even.
* Carry Flag (CF) - set if there was a carry from or borrow to the most significant bit during last result
calculation.