8085 Microprocessor Assembly language Program To Divide 2 Numbers


Aim
To Write assembly language program (ALP ) to divide two number using 8085 microprocessor.
Program
Address
Mnemonics
Opcode
LSB
MSB
Comments
2000
LDA 2201H
3A
01
22
Load accumulator
2003
MOV B,A
47
  
Move A to B
2004
LDA 2202H
3A
02
22
Load accumulator
2007
MVI C,00H
0E
00
 
Clear C
2009
CMP B
B8
  
Compare B with A
200A
JC 200B
DA
0B
20
Jump on carry
200D
SUB B
90
  
Subtract B
200E
INR C
0C
  
Increment C
200F
CMP B
B8
  
Compare B with A
2010
JNC 2000
D2
00
20
Jump on Non carry
2013
STA 27F5
32
F4
27
Store result
2016
MOV A,C
79
  
Move C to A
2017
STA 27F5
32
F5
27
Store result
201A
CALL 06E3
CD
E3
06
Call subroutine
201D
76
76
  
Stop

No comments:

Post a Comment

Post Your valuable comments here ..........