Sei sulla pagina 1di 2

EXPERIMENT 3

OBJECTIVE: Write a program for Addition of two 16 Bit numbers from


memory location as given.

DESCRIPTION: The program takes the content of memory location 2050-2051 add
it to the contents of 2052-2053 and stores the result back at 2054,
2055 & 2056.

APPARATUS: 8085 Microprocessor kit, Power Supply (+5v)

PROCEDURE:
1. Draw the flow chart.
2. Write the op-codes for the Mnemonics instructions.
3. Plug the PS/2 connector of the keyboard to microprocessor 8085 kit.
4. Feed the op-codes in the Microprocessor 8085 kit.
5. After ending press $
6. See the result by pressing G<Program Address>
7. Note the result before and after execution.

ALGORITHM:
1. Move the contents of 2050 to Accumulator.
2. Add the contents of Accumulator and 2051.
3. Store the result in 2054.
4. Move the contents of 2052 to Accumulator.
5. Add the contents of Accumulator and 2053.
6. Store the result in 2055.
7. Clear Accumulator
8. Rotate the contents of Accumulator.
9. Carry will be stored in 2056.

PRECAUTIONS:
1. Check for proper connections of power supply.
2. Enter the codes in the Microprocessor kit properly.
3. Always remember the exact address location where you had started.

RESULT:
Two 16 bit numbers have been added & the result can be verified at 2054, 2055 &
2056.
QUESTIONS :
1. Does the flags get affected by shifting operation.
2. Write the addressing mode of RAL , STA instructions.
3. Write the number of bytes in the following instructions:
INX H
LXI H , 2050
ADC M
STA 2055

PROGRAM :

ADDRESS MNEMONICS REMARKS


2000 LXI H,2050
2003 MOV A,M
2004 INX H
2005 ADD M
2006 STA 2054
2009 INX H
200A MOV A,M
200B INX H
200C ADC M
200D STA 2055
2010 MVI A,00
2012 RAL
2013 STA 2056
2016 RST 5
2017 END

Potrebbero piacerti anche