]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMemRep4.asm
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EfiCommonLib / Ia32 / EfiSetMemRep4.asm
1 ;/*++
2 ;
3 ;Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
4 ;This program and the accompanying materials
5 ;are licensed and made available under the terms and conditions of the BSD License
6 ;which accompanies this distribution. The full text of the license may be found at
7 ;http://opensource.org/licenses/bsd-license.php
8 ;
9 ;THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 ;WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11 ;
12 ;Module Name:
13 ;
14 ;EfiSetMemRep4.c
15 ;
16 ;Abstract:
17 ;
18 ;This is the code that uses rep stosd SetMem service
19 ;
20 ;--*/
21 ;
22 ;---------------------------------------------------------------------------
23 .686
24 .model flat,C
25 .code
26
27 ;---------------------------------------------------------------------------
28 ;#include "Tiano.h"
29 ;
30 ;VOID
31 ;EfiCommonLibSetMem (
32 ;IN VOID *Buffer,
33 ;IN UINTN Count,
34 ;IN UINT8 Value
35 ;)
36 ;/*++
37 ;
38 ;Input: VOID *Buffer - Pointer to buffer to write
39 ;UINTN Count - Number of bytes to write
40 ;UINT8 Value - Value to write
41 ;
42 ;Output: None.
43 ;
44 ;Saves:
45 ;
46 ;Modifies:
47 ;
48 ;Description: This function uses rep stosd to set memory.
49 ;
50 ;--*/
51 EfiCommonLibSetMem PROC
52 push ebp
53 mov ebp,esp
54 push edi
55 mov ecx,dword ptr [ebp+0Ch]
56 test ecx, ecx
57 je Exit
58 mov al,byte ptr [ebp+10h]
59 mov ah, al
60 shrd edx, eax, 16
61 shld eax, edx, 16
62 mov edx, ecx
63 mov edi,dword ptr [ebp+8]
64 shr ecx, 2
65 rep stosd
66 mov ecx, edx
67 and ecx, 3
68 rep stosb
69 Exit:
70 pop edi
71 pop ebp
72 ret
73
74 EfiCommonLibSetMem ENDP
75 END