mirror of
https://github.com/reactos/reactos.git
synced 2024-11-10 00:34:39 +00:00
31 lines
303 B
C
31 lines
303 B
C
|
/* $Id$
|
||
|
*/
|
||
|
|
||
|
#include "tchar.h"
|
||
|
|
||
|
.globl _tcsnlen
|
||
|
|
||
|
_tcsnlen:
|
||
|
push %edi
|
||
|
mov 0x8(%esp), %edi
|
||
|
mov 0xC(%esp), %ecx
|
||
|
xor %eax, %eax
|
||
|
test %ecx, %ecx
|
||
|
jz .L1
|
||
|
mov %ecx, %edx
|
||
|
|
||
|
cld
|
||
|
|
||
|
repne _tscas
|
||
|
|
||
|
sete %al
|
||
|
sub %ecx, %edx
|
||
|
sub %eax, %edx
|
||
|
mov %edx, %eax
|
||
|
|
||
|
.L1:
|
||
|
pop %edi
|
||
|
ret
|
||
|
|
||
|
/* EOF */
|