An error like this division error is an overflow. manually handle this error, change the INT 0 address in the interrupt vectors table
.model small
.stack 100h
.data
number dw '12345'
result db 15 dup('$')
.code
main proc
mov ax,@data
mov ds,ax
mov ax,number
mov bx,offset result
mov cx,0
l1: mov dx,0
div cx
add dx,48
push dx
inc cx
cmp ax,0
jne l1
l2: pop dx
mov [bx],dl
inc bx
loop l2
mov ah,9
mov dx,offset result
int 21h
mov ax,4c00h
int 21h
main endp
end main
+3
source to share