0% found this document useful (0 votes)
4 views7 pages

8085 Largest Number

Uploaded by

NEERAJ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views7 pages

8085 Largest Number

Uploaded by

NEERAJ
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Object-: Write a program to find the largest number in an array of data.

Memory Data
INPUT -: Location
6000H 05H
6001H 55H
6002H 21H
6003H 41H
6004H 73H
6005H 06H

OUTPUT -: Memory Data


Location
6010H 73H
Address Mnemonics Operand Opcode Comment
7000 LXI H, 6000H 21 Initialize H-L pair to memory location
7001 00
7002 60
7003 MOV C, M 4E Move the byte from memory to register C
7004 INX H 23 Increment the pointer H-L pair
7005 MOV A, M 7E Move the byte from memory to register B
7006 DCR C 0D Decrement counter C
7007 INX H 23 Increment the pointer H-L pair
7008 MOV B, M 46 Move the byte from memory to register B
7009 CMP B B8
700A JNC 700EH D2 Jump to address 700EH if the carry is not zero
700B 0E

700C 70
700D MOV A, B 78 Move the byte from register B to register A

700E DCR C 0D Decrement counter C

700F JNZ 7007 C2 Jump to address 7007H if the counter is not zero

7010 07

7011 70

7012 STA 6010 32 Store the result from accumulator to the destination

7013 10

7014 60

7015 HLT CF Terminate the program


PROCEDURE
INPUT DATA LOADING -:
S. PRESS DISPLAY
S. PRESS DISPLAY
No. KEY
No. KEY
13. 41 6003 41
1. ANSHUMAN
14. CR 6004 XX
2. S Substut?
15. 73 6004 73
3. CR Memory
16. CR 6005 XX
4. CR Addr
17. 06 6005 06
5. 6000 6000
18. CR 6006 XX
6. CR 6000 XX
7. 05 6000 05
8. CR 6001 XX
9. 55 6001 55
10. CR 6002 XX
11. 21 6002 21
12. CR 6003 XX
PROCEDURE -: S. No. PRESS KEY DISPLAY
PROGRAM LOADING -: 16. CR 7005 7E
S. No. PRESS KEY DISPLAY
17. CR 7006 0D
1. ANSHUMAN 18. CR 7007 23
2. S Substut? 19. CR 7008 46
3. CR Memory 20. CR 7009 B8
4. CR Addr 21. CR 700A D2
5. 7000 7000 22. CR 700B 0E
6. CR 7000 XX 23. CR 700C 70
7. 21 7000 21 24. CR 700D 78
8. CR 7001 XX 25. CR 700E 0D
9. 00 7001 00 26. CR 700F C2
10. CR 7002 XX 27. CR 7010 07
11. 60 7002 60 28. CR 7011 70
12. CR 7003 XX 29. CR 7012 32
13. 4E 7003 4E 30. CR 7013 10
14. CR 7004 XX 31. CR 7014 60
15. 23 7004 23 32. CR 7015 CF
EXECUTION OF THE PROGRAM -:

S. PRESS DISPLAY
No. KEY
22. ESC Command
23. G Goto?
24. CR Burst
25. CR Addr
26. 7000 7000
27. CR Command=
CHECKING RESULT -:
INPUT -:
S. PRESS DISPLAY Memory Data
No. KEY Location
1. ANSHUMAN 6000H 05H
2. S Substut? 6001H 55H
3. CR Memory 6002H 21H
4. CR Addr 6003H 41H
5. 6010 6010 6004H 73H
6. CR 6010 73 6005H 06H

OUTPUT -: Memory Data


Location
6010H 73H

You might also like