2007-03-15 10:58:19 +00:00
|
|
|
/* $Id$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "tchar.h"
|
2010-11-15 01:29:12 +00:00
|
|
|
#include <asm.inc>
|
2007-03-15 10:58:19 +00:00
|
|
|
|
2010-11-02 00:06:33 +00:00
|
|
|
PUBLIC _tcsncmp
|
|
|
|
.code
|
2007-03-15 10:58:19 +00:00
|
|
|
|
|
|
|
_tcsncmp:
|
2010-11-02 00:06:33 +00:00
|
|
|
push esi
|
|
|
|
push edi
|
|
|
|
mov esi, [esp + 12] /* s1 */
|
|
|
|
mov edi, [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
|
|
|
|
|
|
|
.L1:
|
2010-11-02 00:06:33 +00:00
|
|
|
dec ecx
|
|
|
|
js .L2
|
|
|
|
_tlods
|
|
|
|
_tscas
|
|
|
|
jne .L3
|
|
|
|
test eax, eax
|
|
|
|
jne .L1
|
2007-03-15 10:58:19 +00:00
|
|
|
|
2007-10-19 23:21:45 +00:00
|
|
|
.L2:
|
2010-11-02 00:06:33 +00:00
|
|
|
xor eax, eax
|
|
|
|
jmp .L4
|
2007-03-15 10:58:19 +00:00
|
|
|
|
|
|
|
.L3:
|
2010-11-02 00:06:33 +00:00
|
|
|
sbb eax, eax
|
|
|
|
or al, 1
|
2007-03-15 10:58:19 +00:00
|
|
|
|
|
|
|
.L4:
|
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 */
|