data segment
tab db "qwertyuiop"
char1 db "Press any symbol to proceed$"
char2 db "Position is:$"
char3 db "Another one? $"
data ends

store segment stack
db 256 dup(?)
store ends

code segment
assume cs:code,ds:data, ss:store
start:
mov ax, data
mov ds,ax
c:
mov dx, offset char1
mov ah,9
int 21h
mov ah,2
mov dl,10
int 21h

mov ah,1
int 21h
mov bl,al

mov ah,2
mov cx,10
mov si, offset tab
mov dl,1

begin:
mov al,tab[si]
cmp al,bl
je a
inc dl
inc si
loop begin
a:
mov bl,dl

mov ah,2
mov dl,10
int 21h
mov dx, offset char2
mov ah,9
int 21h
mov ah,2
mov dl,10
int 21h


mov dl,bl
or dl,30h
mov ah,2
int 21h

mov ah,2
mov dl,10
int 21h
mov dx, offset char3
mov ah,9
int 21h
mov ah,1
int 21h
cmp al,'*'
je b
mov ah,2
mov dl,10
int 21h

jmp c
b:




mov ah,4ch
int 21h
code ends
end start