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_RtlMemoryUlong.asm
6 ; * PURPOSE: Memory functions
7 ; * PROGRAMMER: Magnus Olsen (magnusolsen@greatlord.com)
15 GLOBAL _RtlFillMemoryUlong@12 ; (no bug) (max optimze code)
23 ; * VOID STDCALL RtlFillMemoryUlong (PVOID Destination, ULONG Length, ULONG Fill)
26 _RtlFillMemoryUlong@12:
27 mov ecx, dword [esp + 8 ] ; Length
28 shr ecx,2 ; Length = Length / sizeof(ULONG)
29 jz .zero ; if (Length==0) goto .zero
32 mov edi, dword [esp + (4 + 4)] ; Destination
33 mov eax, dword [esp + (12 + 4)] ; Fill
35 rep stosd ; while (Length>0) {Destination[Length-1]=Fill; Length = Length - 1}