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