2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS kernel
4 * FILE: comparememory_ulong_asm.S
5 * PURPOSE: Memory functions
6 * PROGRAMMERS: Patrick Baggett (baggett.patrick@gmail.com)
7 * Alex Ionescu (alex@relsoft.net)
8 * Magnus Olsen (magnusolsen@greatlord.com)
11 .intel_syntax noprefix
13 /* GLOBALS ****************************************************************/
15 .globl _RtlCompareMemoryUlong@12 // [5] (no bug)
17 /* FUNCTIONS ***************************************************************/
19 _RtlCompareMemoryUlong@12:
21 mov ecx, dword [esp + 8 ] // ecx = Length
22 shr ecx,2 // Length / sizeof(ULONG)
23 jz 1f // if (Length==0) goto .zero
25 push edi// register that does not to be save eax,ecx,edx to
26 push ebx// the stack for protetion
28 mov edi, dword [esp + (4 + 8)] // edx = Destination
29 mov eax, dword [esp + (12 + 8)] // ebx = value