Oops. I misspoke. You don't need "byte" there, nor on the "lea" line... Like so:
section .text
org 100h
pusha
mov ah,06h
mov al,00h
mov cx,0000h
mov dx,184fh
int 10h
mov ah,02h
mov bh,00
mov dx,0000h
int 10h
mov cx,256
lea dx, [znak]
d20: cmp byte [znak], 08h
jb d30
cmp byte [znak],0dh
jbe d40
d30: mov ah,09h
int 21h
d40: inc byte [znak]
loop d20
popa
mov ax,4c00h
int 21h
section .data
znak db 0, ' ', '$'