X-Git-Url: http://git.jankratochvil.net/?p=reactos.git;a=blobdiff_plain;f=lib%2Fntdll%2Fnasm%2Frtl%2Fi386_RtlFillMemoryUlong.asm;fp=lib%2Fntdll%2Fnasm%2Frtl%2Fi386_RtlFillMemoryUlong.asm;h=05509f183929c7aaba662838b6d2b5d369edbb94;hp=0000000000000000000000000000000000000000;hb=a3df8bf1429570e0bd6c6428f6ed80073578cf4b;hpb=7c0db166f81fbe8c8b913d7f26048e337d383605 diff --git a/lib/ntdll/nasm/rtl/i386_RtlFillMemoryUlong.asm b/lib/ntdll/nasm/rtl/i386_RtlFillMemoryUlong.asm new file mode 100644 index 0000000..05509f1 --- /dev/null +++ b/lib/ntdll/nasm/rtl/i386_RtlFillMemoryUlong.asm @@ -0,0 +1,38 @@ +; * base on ntdll/rtl/mem.c v 1.13 2003/07/11 13:50:23 +; * +; * COPYRIGHT: See COPYING in the top level directory +; * PROJECT: ReactOS kernel +; * FILE: i386_RtlMemoryUlong.asm +; * PURPOSE: Memory functions +; * PROGRAMMER: Magnus Olsen (magnusolsen@greatlord.com) +; * UPDATE HISTORY: +; * Created 20/07-2003 +; * + + + + BITS 32 + GLOBAL _RtlFillMemoryUlong@12 ; (no bug) (max optimze code) + + SECTION .text + + + + +; * +; * VOID STDCALL RtlFillMemoryUlong (PVOID Destination, ULONG Length, ULONG Fill) +; * + +_RtlFillMemoryUlong@12: + mov ecx, dword [esp + 8 ] ; Length + shr ecx,2 ; Length = Length / sizeof(ULONG) + jz .zero ; if (Length==0) goto .zero + + push edi + mov edi, dword [esp + (4 + 4)] ; Destination + mov eax, dword [esp + (12 + 4)] ; Fill + cld + rep stosd ; while (Length>0) {Destination[Length-1]=Fill; Length = Length - 1} + pop edi +.zero: + ret 12