An array of ten data bytes is stored on memory locations 2100H onwards. Write an 8085 assembly language program to find the largest number and store it on memory location 2200H.


  • Flow chart

  • Program

Line

Program

PC

Byte

0

-

0000

-

1

LXI H 2100

0003

3

2

MVI C 0A

0005

2

3

MOV A M

0006

1

4

L2:DCR C

0007

1

5

JZ L1

0014/000A

3

6

INX H

000B

1

7

MOV B M

000C

1

8

CMP B

000D

1

9

JNC L2

0006/0010

3

10

MOV A B

0011

1

11

JMP L2

0014

3

12

L1:STA 2200

0017

3

13

HLT

 

1