Add .gitattributes and .gitignore files and normalize line endings in the repository...
[reactos.git] / sdk / lib / crt / string / i386 / tcsncpy.inc
1
2 #include "tchar.h"
3 #include <asm.inc>
4
5 PUBLIC _tcsncpy
6 .code
7
8 FUNC _tcsncpy
9 FPO 0, 3, 2, 2, 0, FRAME_FPO
10 push esi
11 push edi
12 mov edi, [esp + 12] /* s1 */
13 mov esi, [esp + 16] /* s2 */
14 mov ecx, [esp + 20] /* n */
15
16 xor eax, eax
17 cld
18
19 .L1:
20 dec ecx
21 js .L2
22 _tlods
23 _tstos
24 test _treg(a), _treg(a)
25 jnz .L1
26 rep _tstos
27
28 .L2:
29 mov eax, [esp + 12]
30
31 pop edi
32 pop esi
33 ret
34 ENDFUNC
35
36 END
37 /* EOF */