code segment
assume cs:code
start:
mov cx,2
mov bl,0
next:
mov ah,1
int 21h
sub al,30h
jc next
cmp al,9h
ja next
add al,bl
daa
mov bl,al
mov dl,13
mov ah,2
int 21h
mov dl,10
int 21h
loop next
mov cl,4
mov dh,2
next1:
rol bl,cl
mov dl,bl
and dl,0fh
add dl,30h
mov ah,2
int 21h
dec dh
jnz next1
mov ah,1
int 21h
mov ah,4ch
int 21h
code ends
end start