Var contains data which will be evaluated as ASCII , but as 4 is in deciaml it will be evaluated as ASCII value 4 , which is a nonprintable chracter.
You need to convert 4 to ASCII "4" . To convert 4 to ASCII "4" you need to add 30(deciaml) . AS in ASCII "0" starts from 30 and "9" at 39.
You need to separate each digit and change that to ASCII ( in range 30 to 39).
that is to print 17 (decimal) you have to separate 1 and 7 and change it to 1 => 31h and 7 => 37h.
And print as
data db 2dup(0)
mov [data],31h
mov [data+1],37h
lea dx,data
mov ah,09h
int 21h