0% found this document useful (0 votes)
6 views3 pages

8086 Microprocessor Programming

The document describes various addressing modes of the 8086 microprocessor, including Immediate, Register, Direct, and others, with examples for each. It also explains specific instructions such as XLAT, XCHG, DAA, ADC, and rotation instructions, along with their usage. Additionally, it covers the functions of CALL and RET instructions and compares Jump and Call instructions.

Uploaded by

kishorgaikar826
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views3 pages

8086 Microprocessor Programming

The document describes various addressing modes of the 8086 microprocessor, including Immediate, Register, Direct, and others, with examples for each. It also explains specific instructions such as XLAT, XCHG, DAA, ADC, and rotation instructions, along with their usage. Additionally, it covers the functions of CALL and RET instructions and compares Jump and Call instructions.

Uploaded by

kishorgaikar826
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1. Describe various addressing modes of 8086 with a suitable example for each.

Answer:

The 8086 microprocessor has several addressing modes:


1. Immediate Addressing Mode: MOV AL, 05H
2. Register Addressing Mode: MOV AX, BX
3. Direct Addressing Mode: MOV AL, [2500H]
4. Register Indirect Addressing Mode: MOV AL, [BX]
5. Indexed Addressing Mode: MOV AL, [SI]
6. Base Indexed Addressing Mode: MOV AL, [BX+SI]
7. Base Indexed with Displacement Mode: MOV AL, [BX+SI+05H]

2. Write appropriate instructions to perform the following operations:


Answer:

(a) Initialize stack at 42000H:


MOV SP, 2000H
MOV SS, 4200H

(b) Rotate register BX left 4 times:


MOV BX, 1234H
ROL BX, 4

3. Explain the following instructions of 8086:


Answer:

(a) XLAT: Used for table lookup. Example:


MOV AL, 02H
MOV BX, OFFSET TABLE
XLAT

(b) XCHG: Swaps contents of registers. Example:


MOV AX, 1234H
MOV BX, 5678H
XCHG AX, BX

(c) MOV: Moves data. Example:


MOV AL, 25H
MOV BX, AX

(d) LXI: Not in 8086, used in 8085. Equivalent: MOV AX, 1234H

4. Explain the following instructions of 8086 with a suitable example:


Answer:
(a) DAA: Adjusts AL for BCD. Example:
MOV AL, 29H
ADD AL, 37H
DAA

(b) ADC: Adds with carry. Example:


MOV AL, 50H
ADD AL, 30H
ADC AL, 05H

(c) MUL: Multiplies unsigned. Example:


MOV AL, 05H
MOV BL, 02H
MUL BL

5. Explain any four rotation instructions with an example.


Answer:

1. ROL (Rotate Left): ROL AL, 1


2. ROR (Rotate Right): ROR AL, 1
3. RCL (Rotate Left through Carry): RCL AL, 1
4. RCR (Rotate Right through Carry): RCR AL, 1

6. What are the functions of CALL and RET instructions? Write syntax.
Answer:

CALL: Calls a subroutine. Example:


CALL SUB_ROUTINE
SUB_ROUTINE:
RET

RET: Returns from subroutine.


RET

7. Compare Jump and Call Instructions.


Answer:

You might also like