Microprocessor &amp Micro Controller Expt No.9

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

EXPERIMENT No. 9 1.

0 TITLE :
To write a program to add the contents of 10 memory locations & to store the result in the next memory location.

2.0 PRIOR CONCEPTS:


8085 Architecture & Instruction Set

3.0 NEW CONCEPTS:


1. Entering different data in ten memory locations. 2. Selecting a memory location by entering its number in HL register. 3. Entering the number of memory locations in any register C , for example. 4. Formation of a loop using JUMP instruction. 5. Adding the contents of 10 memory locations in the accumulator. 6. Copying the result from accumulator to the next memory location.

4.0 LEARNING OBJECTIVES:


1. To enter different data in ten memory locations as listed below .

2. To select a memory location by entering its number in HL register. 3. To enter the number of memory locations in the register C. 4. To clear the contents of the accumulator. 5. To form a loop using JUMP instruction. 6. To add the contents of each memory location in the accumulator.

5.0 APPARATUS:
8085 Microprocessor Kit.
6.0

PROCEDURE & OBSERVATION TABLE :


Memory location 7000 Hex code 21 Instruction LXI H,7050 H Comment Load value of memory location 7050

in the HL pair register. 7001 7002 7003 7004 7005 7006 7007 7008 7009 700A 700B 700C 50 70 AF OE OA 86 23 OD C2 06 70 77 MOV M,A Copy the contents of accumulator to memory location listed in the HL pair. Reset ADD M INX H DCR C JNZ Add the contents of memory location listed in HL pair to accumulator. Increment the contents of HL pair by 1. Decrement the contents of register C by 1. Jump if no zero to memory location 7006 XRA A MVI C, OAH Clear the contents ofaccumulator or load 00H in the accumulator. Load OA H in the register C.

700D

CF

Contents before execution 7050 7051 7052 7053 7054 01 01 01 01 01

Contents after execution 7050 7051 7052 7053 7054 01 01 01 01 01

7055 7056 7057 7058 7059 705A

01 01 01 01 01 XX

7055 7056 7057 7058 7059 705A

01 01 01 01 01 0A

You might also like