assume cs:code,ds:data

data segment
find db 19h
result db ?
arr db 15h,8h,4h,14h,19h,12h,77h
count equ 7
data ends



code segment
start:
mov ax,data
mov ds,ax

mov bp,offset arr
mov cx,count
mov si,0
mov dl,find 

lp1:
cmp dl, [bp+si]
jz done
inc si
loop lp1

;not found
mov result,-1
jmp endofprog

done:
mov dx,si
mov result,dl  

;show result using dos interrupt
mov ah,02h
;add 30h to dl to convert to ascii digit
add dl,30h
int 21h


endofprog:
mov ax,4c00h
int 21h
code ends
end start
