Assignment Division 8 Bit Hex Num: Microprocessor & Peripheral Interfacing
Assignment Division 8 Bit Hex Num: Microprocessor & Peripheral Interfacing
ASSIGNMENT
DIVISION 8 BIT HEX NUM
Date:23/01/2018
AIM: A) WAP to divide 8-bit hex number which is stored at memory location 2500. Divisor is
stored at 2501. Store the quesent in 2502 and reminder 2503.
FLOWCHART:
LXI H 2500
MOV A,M
INX H
MVI B 00
SUB M
INR B
JNC back
If carry
DCR B
ADD M
INX H
MOV M,B
INX H
MOV M,A
Division of 8 bit hex num
RST 5
MICROPROCESSOR & PERIPHERAL INTERFACING
CODE:
2000 LXI 2500
2003 MOV A,M
2004 INX H
2005 MVI B 00
2007 SUB M
2009 INR B
200A JNC 2007
200D DCR B
200E ADD M
2011 INX H
2012 MOV M,B
2013 INX H
2014 MOV M,A
2015 RST 5
INPUT:
OUTPUT: