1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
;*
;* $Id: fmemcmp.asm,v 1.2 2004/05/31 16:08:41 andrew_belov Exp $
;* ---------------------------------------------------------------------------
;* This file provides a far memory comparison routine.
;*
INCLUDE ASM_INCL.INC
;*
;* Exported stubs
;*
public far_memcmp
.CODE _TEXT
;*
;* Comprares two FAR memory blocks
;*
far_memcmp proc, str1:dword, str2:dword, len:word
push ds
push es
push si
push di
push cx
mov cx, len
jcxz @matched
cld
lds si, str1
les di, str2
repe cmpsb
jcxz @matched
mov ax, 1
jmp short @ret
@matched:
sub ax, ax
@ret:
pop cx
pop di
pop si
pop es
pop ds
ret
far_memcmp endp
end
|