Can help me fix this, I don't know how to divide the numbers I imputed and the output of it is wrong but I know that my code on the division is wrong but I don't know what is wrong with it and the output of my multiplication doesn't exceed 9, I want to input double digit numbers like 10 and so on but I don't know how
.model small
.stack 1000
.data
Selection DB 13,10,'1.) Multiplication',10,'2.) Division',10,'3.) Exit',10,10,'Select:$'
First_Number DB 13,10,10,'ENTER FIRST NUMBER:$'
Second_Number DB 13,10,'ENTER SECOND NUMBER: $'
Answer1 DB 13,10,10,'The Product is:$'
Answer2 DB 13,10,10,'The Quotient is:$'
.code
Start:
mov ax, @data
mov ds, ax
mov dx, OFFSET Selection
mov ah, 9
int 21h
mov ah, 1
int 21h
cmp al,'1'
jz Multiplication
cmp al,'2'
jz Division
cmp al,'3'
jz Done
Multiplication:
mov dx, OFFSET First_Number
mov ah, 9
int 21h
mov ah, 01
int 21h
mov bl, al
and bl, 0fh
mov dx, OFFSET Second_Number
mov ah, 9
int 21h
mov ah, 01
int 21h
mov bh, al
and bh, 0fh
mul bx
mov ah, 0
mov bl, al
aas
or ax, 3030h
mov bx, ax
mov dx, OFFSET Answer1
mov ah, 9
int 21h
mov dl, bh
mov ah, 2
int 21h
mov dl, bl
mov ah, 2
int 21h
Jmp Start
Division:
mov dx, OFFSET First_Number
mov ah, 9
int 21h
mov ah, 01
int 21h
mov bl, al
and bl, 0fh
mov dx, OFFSET Second_Number
mov ah, 9
int 21h
mov ah, 01
int 21h
mov bh, al
and bh, 0fh
div bx
mov ah, 0
mov bl, al
aas
or ax, 3030h
mov bx, ax
mov dx, OFFSET Answer1
mov ah, 9
int 21h
mov dl, bh
mov ah, 2
int 21h
mov dl, bl
mov ah, 2
int 21h
Jmp Start
Done:
mov ah, 4ch
int 21h
END
What I have tried:
I didn't do much changing, I only did the locations of the codes