~ubuntu-branches/ubuntu/precise/arj/precise-security

« back to all changes in this revision

Viewing changes to fmemcmp.asm

  • Committer: Bazaar Package Importer
  • Author(s): Guillem Jover
  • Date: 2004-06-27 08:07:09 UTC
  • Revision ID: james.westby@ubuntu.com-20040627080709-1gkxm72ex66gkwe4
Tags: upstream-3.10.21
ImportĀ upstreamĀ versionĀ 3.10.21

Show diffs side-by-side

added added

removed removed

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