2007-03-15 10:58:19 +00:00
|
|
|
/* $Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "tchar.h"
|
2010-11-02 00:06:33 +00:00
|
|
|
#include <reactos/asm.h>
|
2007-03-15 10:58:19 +00:00
|
|
|
|
2010-11-02 00:06:33 +00:00
|
|
|
PUBLIC _tcsncpy
|
|
|
|
.code
|
2007-03-15 10:58:19 +00:00
|
|
|
|
|
|
|
_tcsncpy:
|
2010-11-02 00:06:33 +00:00
|
|
|
push esi
|
|
|
|
push edi
|
|
|
|
mov edi, [esp + 12] /* s1 */
|
|
|
|
mov esi, [esp + 16] /* s2 */
|
|
|
|
mov ecx, [esp + 20] /* n */
|
2007-03-15 10:58:19 +00:00
|
|
|
|
2010-11-02 00:06:33 +00:00
|
|
|
xor eax, eax
|
|
|
|
cld
|
2007-03-15 10:58:19 +00:00
|
|
|
|
2007-10-19 23:21:45 +00:00
|
|
|
.L1:
|
2010-11-02 00:06:33 +00:00
|
|
|
dec ecx
|
|
|
|
js .L2
|
|
|
|
_tlods
|
|
|
|
_tstos
|
|
|
|
test _treg(a), _treg(a)
|
|
|
|
jnz .L1
|
|
|
|
rep _tstos
|
2007-03-15 10:58:19 +00:00
|
|
|
|
|
|
|
.L2:
|
2010-11-02 00:06:33 +00:00
|
|
|
mov eax, [esp + 12]
|
2007-03-15 10:58:19 +00:00
|
|
|
|
2010-11-02 00:06:33 +00:00
|
|
|
pop edi
|
|
|
|
pop esi
|
|
|
|
ret
|
2007-03-15 10:58:19 +00:00
|
|
|
|
2010-11-02 00:06:33 +00:00
|
|
|
END
|
2007-03-15 10:58:19 +00:00
|
|
|
/* EOF */
|