Division of 32 Bit Number With 16 Bit Number

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

Adam’s Engineering College, Paloncha

ECE Department –MPI LAB

Experiment No.: 6 Year : III/IV B.Tech II Semester


Page 1 of 1

DIVISION OF 32-BIT NUMBER BY 16-BIT


NUMBER

Aim: - To write an assembly language program for


division of 32-bit number by a 16-bit number.

Registers: - AL, AH and CL

Description: - A 16-bit number is divided with an 8-


bit number and quotient is stored in AX and remainder
in AH.

Ports: - None.

DATA SEGMENT

DIVIDEND DW 2 DUP(0)
DIVISOR DB ?
QUO DW 1 DUP(0)
REM DW 1 DUP(0)
DATA ENDS

CODE SEGMENT
ASSUME CS: CODE, DS : DATA
START:
MOV AX, DIVIDEND
MOV DX, DIVISOR+2
DIV DIVISOR
MOV QUO, AX
MOV REM, DX

CODE ENDS
END START

Result: Division of 32-bit with-bit number is obtained.


Lab in-charge HOD, ECE

You might also like