modifikace predchoziho kodu
[bits 16]
[org 100h]
eolchars db ' ',13,'$'
[section .text]
readkey:mov ah,0
in al,60h
dec ax
jz exit
inc ax
call bin2dec
mov ah,9
mov dx,eolchars
int 21h
jmp readkey
bin2dec:mov bx,10
digit: xor dx,dx
div bx
push dx
or ax,ax
jz print
call digit
print: mov ah,02
pop dx
add dl,'0'
int 21h
exit: ret
human readable form