Assembly language programming

Write an 8085 assembly language program to add two blocks (2001 & 3001) of N 8-bit numbers. Store result into 3rd block of memory. [N=10] 


  • Flow chart
  • Program

Line

Program

PC

Byte

0

-

0000

-

1

LXI B 4001

0003

3

2

LXI D 2001

0006

3

3

LXI H 3001

0009

3

4

PUSH B

000A

1

5

MVI C 0A

000C

2

6

L1:LDAX D

000D

1

7

ADD M

000E

1

8

INX H

000F

1

9

INX D

0010

1

10

XTHL

0011

1

11

MOV M A

0012

1

12

INX H

0013

1

13

XTHL

0014

1

14

DCR C

0015

1

15

JNZ L1

000C/0018

3

16

HLT

 

1




Post a Comment

0 Comments