update for HEAD-2003091401
[reactos.git] / lib / string / i386 / tcslen.h
diff --git a/lib/string/i386/tcslen.h b/lib/string/i386/tcslen.h
new file mode 100644 (file)
index 0000000..41f5667
--- /dev/null
@@ -0,0 +1,24 @@
+/* $Id$
+*/
+
+#include "tchar.h"
+
+.globl _tcslen
+
+_tcslen:
+ push  %edi
+ mov   0x8(%esp), %edi
+ xor   %eax, %eax
+ mov   $-1, %ecx
+ cld
+
+ repne _tscas
+
+ not   %ecx
+ dec   %ecx
+
+ mov   %ecx, %eax
+ pop   %edi
+ ret
+
+/* EOF */