;PROGRAM TO FIND THE POSITION OF A CHARACTER IN THE GIVEN STRING
data segment
source db 'abcdefg'
len equ $-source
postn db 0
data ends
code segment
assume cs:code,ds:data
start:
mov ax,data
mov ds,ax
mov es,ax
mov di,offset source
mov cl,len
cld
mov al,'d'
repne scasb
jnz ex
mov bx,di
mov postn,bl
ex:
int 3
code ends
end start
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment