* Sync to trunk HEAD (r53318).
[reactos.git] / lib / sdk / crt / string / i386 / tcsncpy.inc
1 /* $Id: tcsncpy.inc 49591 2010-11-15 01:29:12Z tkreuzer $
2 */
3
4 #include "tchar.h"
5 #include <asm.inc>
6
7 PUBLIC _tcsncpy
8 .code
9
10 _tcsncpy:
11 push esi
12 push edi
13 mov edi, [esp + 12] /* s1 */
14 mov esi, [esp + 16] /* s2 */
15 mov ecx, [esp + 20] /* n */
16
17 xor eax, eax
18 cld
19
20 .L1:
21 dec ecx
22 js .L2
23 _tlods
24 _tstos
25 test _treg(a), _treg(a)
26 jnz .L1
27 rep _tstos
28
29 .L2:
30 mov eax, [esp + 12]
31
32 pop edi
33 pop esi
34 ret
35
36 END
37 /* EOF */