This site is developed to help engineering students. The site is new. Right now, we have only microprocessor programs in here. We will keep including more topics on more subjects in the future.
Microprocessor 8085 Programs

Monday, June 24, 2013

Division

Program: Division with Divisor and Dividend stored in memory.

Note: Program starts from memory location 8000H.
         Assuming: Divisor stored at  9000H, Dividend stored at  9001H.
         Storing Quotient at 9002H, carry(higher byte) at 9003H.

Label
Memory Location
Mnemonics
Opcode
Operand


8000
LXI H, 9000
21
OO
9O

8003
MOV A, M
7E



8004
INX H
23



8005
MOV B,M
46



8006
MVI C, 00H
OE
OO

LOOP2:
8008
MOV D,A
57


LOOP1:
8009
DCR B
O5



800A
DCR D
15



800B
JNZ LOOP1
C2
O9
8O

800E
INR C
OC



800F
CMP B
B8



8010
JC LOOP2
DA
O8
8O

8013
JZ LOOP2
CA
O8
8O

8016
INX H
23



8017
MOV M, C
71



8018
INX H
23



8019
MOV M, B
7O



801A
HLT
76


No comments:

Post a Comment