include	clib.inc
include	string.inc

_TEXT	SEGMENT

strnicmp proc dist pascal public uses si di ds S1:dword, S2:dword, count:word
    lds si,S1
    les di,S2
    mov cx,count
    inc cx
      @@:
	dec cx
	jz @F
	mov al,[si]
	mov ah,es:[di]
	inc si
	inc di
	test al,al
	jz @F
	cmp ah,al
	je @B
	cmpaxi
	je @B
      @@:
	sub al,ah
	cbw
	ret
strnicmp endp

_TEXT	ENDS

	END
