	.386
	.model use32 small
	public _strncmp
	.code
_strncmp:
	push	ebp
	mov	ebp,esp
	push	esi
	push	edi
	mov	ecx,[16+ebp]
	jecxz	zer
	mov	edi,[12+ebp]
	mov	esi,[8+ebp]
	cld
	repe	cmpsb
	je	short zer
	js	short nega
	mov	eax,1
	jmp	short exit
zer:
	sub	eax,eax
	jmp	short exit
nega:
	mov	eax,-1
exit:
	pop	edi
	pop	esi
	pop	ebp
	ret
	end