here is my code
ASSUME cs:code,ds:data,ss:stack
data SEGMENT
ENDS
stack SEGMENT
db 10 dup(0)
ENDS
code SEGMENT
start:
mov ax,data
mov ds,ax
mov ax,stack
mov ss,ax
mov bx,19
call output
mov ah,4CH
int 21H
output proc
mov cx,0
mov ax,bx
mov bx,10
division:
div bx
push dx
inc cx
cmp ax,0
jne division
ret
output endp
code ENDS
end start
I use the debug to find the mistake in my code.
I found that when ax = 0001,bx=000A and I invoke div bx , the ax became E666,I don't kown why it happen , it confused me.