projects
/
reactos.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[CRT]
[reactos.git]
/
lib
/
sdk
/
crt
/
mem
/
i386
/
memchr_asm.s
1
/* $Id$
2
*
3
* COPYRIGHT: See COPYING in the top level directory
4
* PROJECT: ReactOS kernel
5
* FILE: lib/sdk/crt/mem/i386/memchr.s
6
*/
7
8
#include <reactos/asm.h>
9
10
/*
11
* void* memchr(const void* s, int c, size_t n)
12
*/
13
14
PUBLIC _memchr
15
.code
16
17
_memchr:
18
push ebp
19
mov ebp, esp
20
push edi
21
mov edi, [ebp + 8]
22
mov eax, [ebp + 12]
23
mov ecx, [ebp + 16]
24
cld
25
jecxz .Lnotfound
26
repne scasb
27
je .Lfound
28
.Lnotfound:
29
mov edi, 1
30
.Lfound:
31
mov eax, edi
32
dec eax
33
pop edi
34
leave
35
ret
36
37
END