DISPLAY QUOTIENT AND REMAINDER OF 25 DIVIDED BY 10

.model small
.stack 100h
.data
num dw 25
remainder db "Remainder is $"
quotient db "Quotient is $"
.code
main proc
mov ax,@data
mov ds,ax

mov ax,num

mov bl,10
div bl

mov bl,al
mov bh,ah

mov ah,9
mov dx,offset remainder
int 21h

mov ah,02
add bl,30h
mov dl,bl
int 21h

mov ah,02
mov dl,0ah
int 21h

mov ah,9
mov dx,offset quotient
int 21h

mov ah,02
add bh,30h
mov dl,bh
int 21h

mov ah,4ch
int 21h

main endp
end main

Comments