The division of Two Numbers Using procedure in assembly.

Bismillahir Rahmanir Rahim
Solution:

if 1
include mylib1.lib
endif
data segment
qm  db  "The quation is = $"
rm  db  "   The reminder is= $"
aa  db  08
ba  db  05
rq  db  ?
rr  db  ?
data ends
stack segment
db 100 dup(0)
stack ends
code segment
assume cs:code, ds:data, ss:stack
start:
mov ax, seg data
mov ds, ax
mov ax, seg stack
mov ss, ax

call divv

mov dx,offset qm
mov ah,09
int 21h

mov bh,00
mov bl,rq
printd

mov dx,offset rm
mov ah,09
int 21h

mov bh,00
mov bl,rr
printd

mov ax, 4c00h
int 21h
printfd

divv PROC
mov al, aa
mov bl, ba
mov ah,00
div bl
mov rq, al
mov rr,ah
 ret
divv ENDP

code ends
end start

Socializer Widget By Blogger Yard
SOCIALIZE IT →
FOLLOW US →
SHARE IT →