fillmemory_ulong_asm.s
来自「一个类似windows」· S 代码 · 共 32 行
S
32 行
/*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: fillmemory_ulong_asm.S
* PURPOSE: Memory functions
* PROGRAMMERS: Patrick Baggett (baggett.patrick@gmail.com)
* Alex Ionescu (alex@relsoft.net)
* Magnus Olsen (magnusolsen@greatlord.com)
*/
.intel_syntax noprefix
/* GLOBALS ****************************************************************/
.globl _RtlFillMemoryUlong@12 // (no bug) (max optimze code)
/* FUNCTIONS ***************************************************************/
_RtlFillMemoryUlong@12:
mov ecx, dword [esp + 8 ] // Length
shr ecx,2// Length = Length / sizeof(ULONG)
jz 1f // 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
1:
ret 12
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?