i'm a beginner here, my div.asm on division does not work. multiplication works when i change div to mul. which part should i edit? and how to make it display remainders? besides, i have another assignment about converting lower to uppercase and if there is no uppercase of a character, display the original character. i could not make the display original character work with the 1st part which is convert lowercase to uppercase.
mov ax,@data
mov ds,ax
lea dx,msg ;print msg
mov ah,9
int 21h
mov ah,1 ;save input to num2
int 21h
sub al,30h
mov num2,al
lea dx,msg2 ;print msg2
mov ah,9
int 21h
mov ah,1 ;save input to num1
int 21h
sub al,30h
mov num1,al
div num2 ;divide num1 using num2
mov result,al ;store answer to result
aam ;aam converts the result into BCD form and 1st digit save in ah and 2nd digit save in al
add ah,30h ;print data storess in ah and al which is in ascii code, 30h convert to decimal
add al,30h
mov bx,ax ;stores the result in ah and al register to bx
lea dx,msg3 ;print msg3
mov ah,9
int 21h
mov ah,2 ;print data in bh
mov dl,bh
int 21h
mov ah,2 ;write character on console present in bl register
mov dl,bl
int 21h
mov ah,4ch ;exit
int 21h