-
Notifications
You must be signed in to change notification settings - Fork 3
/
Memory_Zero.asm
58 lines (51 loc) · 1.2 KB
/
Memory_Zero.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
;==============================================================================
;
; UASM64 Library
;
; https://github.com/mrfearless/UASM64-Library
;
;==============================================================================
.686
.MMX
.XMM
.x64
option casemap : none
IF @Platform EQ 1
option win64 : 11
ENDIF
option frame : auto
include UASM64.inc
.CODE
UASM64_ALIGN
;------------------------------------------------------------------------------
; Memory_Zero
;
; Memory_Zero is a fast memory zeroing function that works in QWORD unit sizes
; It is usually good practice to allocate memory in intervals of eight for
; alignment purposes and this function is designed to work with memory
; allocated in this way
;
; Parameters:
;
; * pMemoryAddress - The address of the memory block to zero.
;
; * qwMemoryLength - The buffer length to zero.
;
; Returns:
;
; There is no return value.
;
; Notes:
;
; This function as based on: Memory_Fill
;
; See Also:
;
; Memory_Fill
;
;------------------------------------------------------------------------------
Memory_Zero PROC FRAME pMemoryAddress:QWORD, qwMemoryLength:QWORD
Invoke Memory_Fill, pMemoryAddress, qwMemoryLength, 0
ret
Memory_Zero ENDP
END