	.386
	.model use32 small
	public _memcmp
	.code
_memcmp:
	push	ebp
	mov	ebp,esp
	push	esi
	push	edi
	mov	edi,[12+ebp]
	mov	esi,[8+ebp]
	mov	ecx,[16+ebp]
	cld
	repe	cmpsb
	je	short zer
	jc	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