📍General purpose registers
General purpose registers are used to store temporary data with in the microprocessors.
There are 8 general purpose registers in 8086 microprocessor.
1.AX
✓ It is Accumulator .
✓ 16 bits and is divided into two 8-bit registers AH and AL to perform 8-bit instructions.
✓ used for arithmetical and logical instructions.
Example:
ADD AX,02H
ADD AL,400H
2.BX
✓ It is Base register.
✓ 16 bits and is divided into two 8-bit registers BH and BL to perform 8-bit instructions.
✓ used to store the value of the offset.
Example:
MOV BL,500H
MOV BH,02H
3.CX
✓ counter register
✓16 bits and is divided into two 8-bit registers CH and CL to perform 8-bit instructions.
✓ used in looping and rotation.
Example:
MOV CX,0005
MOV CL,5000
4.DX
✓ Data register
✓16 bits register and is divided into two 8-bit registers DH and DL to perform 8-bit instructions.
✓ used in multiplication an input/output port addressing.
Example:
Mul BX(DX,AX=AX*BX)
SPECIAL PURPOSE REGISTERS IN 8086:
1.SP
✓ Stack pointer
✓ 16 bit registers
✓ It points to the topmost element of stack.
✓ If stack is empty the stack pointer will be FFFFH.
✓It's offset address relative to stack segment.
2.BP
✓ Base pointer.
✓ 16 bit registers.
✓ It's prime use is accessing parameters passed by the stack.
✓ It's offset is relative to stack segment.
3.SI
✓ Source index register
✓ 16 bit registers.
✓ Used to point the data and source in some string related operations.
✓ It's offset is relative to data segment.
4.DI
✓ Destination index register.
✓ 16 bit registers.
✓ used to point the destination in some string related operations.
✓ Itthe 's offset is relative to extra segment.