- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
strnstr proc
jrcxz @@3
push rdi
push rsi
mov rdi,rdx
mov al,[r9]
inc r9
dec r8
@@1:
repne scasb
jne @@2
cmp rcx,r8
jb @@2
mov rsi,r9
mov rdx,rdi
mov r10,rcx
mov rcx,r8
repe cmpsb
je @@2
mov rcx,r10
mov rdi,rdx
jmp @@1
@@2:
sete al
movzx rax,al
neg rax
and rax,rdi
pop rsi
pop rdi
ret
@@3:
xor rax,rax
ret
strnstr endp
Dummy00001 16.11.2014 15:56 # +1
inkanus-gray 16.11.2014 22:01 # 0