Discuss the functions of all general purpose registers of 8086.Explain the special function of each register and instruction support for these functions.
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
General Purpose registers are used for temporary storage of data and memory access. Since the processor accesses register more quickly than memory. 8086 has four 16-bit general-purpose registers AX, BX, CX and DX. These are available to the programmer, for storing values during programs. Each of these can be divided into two 8-bit registers such as AH, AL; BH, BL; CL, CH and DL, DH. Beside their general use, these registers also have some specific functions.
Example:
MUL BL ; AX = (AL × BL)
MUL BX ; DX-AX = (AX × BX)
MUL BYTE PTR [BX] ; AX = (AL x DS:[BX])
Example:
MOV CL, [BX] ; Moves a byte from the address pointed by BX in Data Segment into CL. Physical Address calculated as DS * 10H + BX
MOV CH, [BX+6] ; Moves a byte from the address pointed by BX+6 in Data Segment to CH; Physical Address: DS * 10H + BX + 6H
MOV CL, [BX+SI] ; Moves a byte from the address pointed by BX+SI in Data Segment to CL. Physical Address: DS * 10H + BX + SI
Example:
MOV CX, 40H
BACK: MOV AL, BL
ADD AL, BL
. . MOV BL, AL
LOOP BACK
MOV CX, 40H BACK: MOV AL, BL ADD AL, BL . . MOV BL, AL LOOPZ BACK
Example:
MUL BX ; DX-AX = (AX × BX)
MOV DX, 2000H
IN AL, DX