Assembly language program for division of two 8 bit number
Program:
LXI H,2050MOV B,M ;B=3
MVI C,00
INX H
MOV A,M ;A=8
LOOP: CMP B ; IF A=8 > B=3 THEN CY=0
JC NEXT ; JUMP IF C=1
SUB B
INR C
JMP LOOP
NEXT: STA 2052
MOV A,C
STA 2053
HLT
Result:
Memory
Location
|
Data
value
|
2050
|
3
|
2051
|
8
|
2052
|
2
|
2053
|
2
|
Comments
Post a Comment