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