0% found this document useful (0 votes)
20 views

8085 Subtract

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)
20 views

8085 Subtract

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 an 8085 assembly language program to subtract two 8-bit

numbers.

1
PROGRAM

Address Mnemonics Operand Opcode Comment

7000 MVI A, 25H 3E Load A with


data 05H.
7001 25

7002 MVI B, 13H 06 Load B with


data 03H.
7003 13

7004 SUB B 90 Add B with


A.
7005 RST 1 CF Terminate the
program.

2
FLOW START

CHART
LOAD 1st NUMBER

LOAD 2ND NUMBER

SUBTRACT TWO NUMBER

END

3
PROCEDURE -:

PROGRAM LOADING -:
1. Connect the power supply to the microprocessor kit and switch it on.
Address Mnemonics Operand Opcode
S. PRESS DISPLAY 7000 MVI A, 25H 3E
No. KEY 7001 25
1. ANSHUMAN 7002 MVI B, 13H 06
2. S Substut? 7003 13
3. CR Memory 7004 SUB B 90

4. CR Addr 7005 RST 1 CF

5. 7 7
6. 0 70
7 0 700
8. 0 7000
9. CR 7000 XX
10. 3 7000 3X
11. E 7000 3E
4
12. CR 7001 XX
S. PRESS DISPLAY 7000 MVI A, 05H 3E
No. KEY 7001 25

13. 0 7001 0X 7002 MVI B, 13H 06

14. 5 7001 25 7003 13


7004 SUB B 90
15. CR 7002 XX
7005 RST 1 CF
16. 06 7002 06
17. CR 7003 XX
18. 13 7003 13
19. 90 7004 90
20. CR 7005 XX
21. CF 7005 CF
22. CR 7006 XX

5
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=

6
CHECKING CONTENT OF REGISTER -:

S. PRESS KEY DISPLAY


No.
28. S Substut?
29. CR Memory
30. Press any key IO
[except CR/ESC]
31. Press any key register
[except CR/ESC]
32. CR Name
33. CR A=12

RESULT -: INPUT -: A = 25 H
B = 13 H

OUTPUT -: A = 12 H

You might also like