1 ; * base on ntdll/rtl/mem.c v 1.13 2003/07/11 13:50:23
3 ; * COPYRIGHT: See COPYING in the top level directory
4 ; * PROJECT: ReactOS kernel
5 ; * FILE: i386_RtlCompareMemory.asm
6 ; * PURPOSE: Memory functions
7 ; * PROGRAMMER: Magnus Olsen (magnusolsen@greatlord.com)
16 GLOBAL _RtlFillMemory@12 ; [4] (no bug)
21 ; * [6] VOID STDCALL RtlFillMemory (PVOID Destination, ULONG Length, UCHAR Fill)
25 mov ecx,dword [esp + 8 ] ; ecx = Length
26 cmp ecx,0 ; if (Length==0) goto .zero
29 mov edx, dword [esp + 4] ; edx = Destination
30 mov eax, dword [esp + 12] ; eax = fill
32 mov byte [edx + ecx -1],al ; src[Length - 1] = fill
33 dec ecx ; Length = Length - 1
34 jnz .loop ; if (Length!=0) goto .loop