Anda di halaman 1dari 3

Experiment No 1.

Aim : To write an assembly language code to add two 16 – bit numbers by using 8085
microprocessor kit.
Instruments required :

8085 microprocessor kit

Algorithm :

Step 1 : Start

Step 2 : Load HL pair

Step 3 : Load BC pair

Step 4 : Move content of L to A

Step 5 : Add content of C to A and Move updated value of A to L

Step 6 : Move content of H to A

Step 7 : Add content of B to A and Move updated value of A to H

Step 8 : Store data of HL pair at memory location

Step 9 : Stop
Flowchart :

Start

Load HL pair

Load BC pair

Move contents of L to A

Add content of C to A and Move updated value of A to L

Move content of H to A

Add content of B to A and Move updated value of A to H

Store data of HL pair at memory location

Stop
Program :
Address Hexcode Mnemonic Comments

Loads 16 bit data into HL


pair from memory location
2000 2A LHLD, 3000H 3000H
2001 00
2002 30

Loads BC pair with 16 bit


2003 01 LXI B, 2545H data 2545H
2004 45
2005 25

Copies Content of L register


2006 7D MOV A, L into A
2007 81 ADD C Adds contents of C to A
2008 6F MOV L, A Copies contents of A into L
2009 7C MOV A, H Copies contents of H into A

Adds contents of B to A with


200A 88 ADC B carry
200B 67 MOV H, A Copies contents of A into H

Stores 16 bit data of HL pair


200C 22 SHLD, 3002H at memory location 3002H
200D 02
200E 30
200F 76 HLT Stops process

Result :
Address Value Address Value
2004 45 3002 96
2005 25 3003 57
3000 51
3001 32

S Z - AC - P - CY
0 0 0 0 0 1 0 0

Conclusion :

Anda mungkin juga menyukai