8085 Multiplication
8085 Multiplication
8085 Multiplication
INPUT -:
6000 H = 02 H
6001 H = 05 H
OUTPUT -:
6002 H = 0A H
Address Mnemonics Operand Opcode Comment
7000 LXI H, 6000H 21 Load HL pair with address 6000H.
7001 00
7002 60
7003 MOV B, M 46 Move the 1st operand from memory to
register B.
7004 INX H 23 Increment HL pair.
7005 MOV C, M 4E Move the 2nd operand from memory to
register C.
7006 MVI A, 00H 3E Initialize accumulator with 00H.
7007 00
7008 ADD B 80 Add B with A.
7009 DCR C 0D Decrement register C (Counter)
700A JNZ 7008 C2 Jump back to address 7008H if C=0
700B 08
700C 70
700D INX H 23 Increment HL pair.
700E MOV M, A 77 Move the result from A to memory.
700F HLT 76 Halt
START
Increment HL pair
Move the 2nd operand from memory to register C.
END
PROCEDURE
INPUT DATA LOADING -:
INPUT -:
S. PRESS DISPLAY Memory Data
No. KEY Location
1. ANSHUMAN 6000H 02H
2. S Substut? 6001H 05H
3. CR Memory
4. CR Addr
5. 6000 6000
6. CR 6000 XX
7. 02 6000 02
8. CR 6001 XX
9. 05 6001 05
10. CR 6002 XX
PROCEDURE -:
PROGRAM LOADING -:
.
S. PRESS DISPLAY Address Mnemonics Operand Opcode
No. KEY 7000 LXI H, 6000H 21
1. ANSHUMAN 7001 00
2. S Substut? 7002 60
3. CR Memory 7003 MOV B, M 46
4. CR Addr
5. 7000 7000
6. CR 7000 XX
7. 21 7000 21
8. CR 7001 XX
9. 00 7001 00
10. CR 7002 XX
11. 60 7002 60
12. CR 7003 XX
S. PRESS DISPLAY Address Mnemonics Operand Opcode
No. KEY
7003 MOV B, M 46
13. 46 7003 46
7004 INX H 23
14. CR 7004 XX
7005 MOV C,M 4E
15. 23 7004 23
7006 MVI A, 00H 3E
16. CR 7005 XX
7007 00
17. 4E 7005 4E
7008 ADD B 80
18. CR 7006 XX
7009 DCR C 0D
19. 3E 7006 3E
20. CR 7007 XX
21. 00 7007 00
22. CR 7008 XX
23. 80 7008 80
24. CR 7009 XX
25. 0D 7009 0D
26. CR 700A XX
S. PRESS DISPLAY Address Mnemonics Operand Opcode
No. KEY 700A JNZ 7008 C2
27. C2 700A C2 700B 08
28. CR 700B XX 700C 70
29. 08 700B 08 700D INX H 23
30. CR 700C XX 700E MOV M, A 77
31. 70 700C 70 700F HLT 76
32. CR 700D XX
33. 23 700D 23
34. CR 700E XX
35. 77 700E 77
36. CR 700F XX
37. 76 700F 76
38. CR 7010 XX
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=
8
CHECKING RESULT -:
S. PRESS DISPLAY
No. KEY
1. ANSHUMAN
2. S Substut?
3. CR Memory
4. CR Addr
5. 6002 6002
6. CR 6002 0A
After Execution
6002 H = 0A H