I've coded something like that. It's supposed to show 25499, but it doesn't. It shows 25309. What's wrong with this code?
org 100h
start:
mov ax, [liczba]
xor dx, dx
mov cx, 10000
div cx
or al, '0'
call showChar
mov ax, dx
xor dx, dx
mov cx, 1000
div cx
or al, '0'
call showChar
mov ax, dx
mov cl, 100
div cl
or al, '0'
mov cl, ah
call showChar
mov al, cl
xor ah, ah
mov cl, 10
div cl
or ax, '0'
mov cl, ah
or cl, '0'
call showChar
mov ah, 2
mov dl, cl
int 21h
;Terminate process
mov ax, 4c00h
int 21h
showChar:
mov ah, 2h
mov dl, al
int 21h
ret
liczba dw 25499