update for HEAD-2003091401
[reactos.git] / lib / string / i386 / tcsncpy.h
diff --git a/lib/string/i386/tcsncpy.h b/lib/string/i386/tcsncpy.h
new file mode 100644 (file)
index 0000000..3b41298
--- /dev/null
@@ -0,0 +1,34 @@
+/* $Id$
+ */
+
+#include "tchar.h"
+
+.globl _tcsncpy
+
+_tcsncpy:
+ push %esi
+ push %edi
+ mov  0x0C(%esp), %edi /* s1 */
+ mov  0x10(%esp), %esi /* s2 */
+ mov  0x14(%esp), %ecx /* n */
+
+ xor  %eax, %eax
+ cld
+
+.L1:   
+ dec  %ecx
+ js   .L2
+ _tlods
+ _tstos
+ test %_treg(a), %_treg(a)
+ jnz  .L1
+ rep  _tstos
+
+.L2:
+ mov  0x0C(%esp), %eax
+
+ pop  %edi
+ pop  %esi
+ ret
+
+/* EOF */