1 /** @file
2   AsmReadEs function
3 
4   Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5   SPDX-License-Identifier: BSD-2-Clause-Patent
6 
7 **/
8 
9 
10 
11 
12 /**
13   Reads the current value of ES Data Segment Register (ES).
14 
15   Reads and returns the current value of ES. This function is only available on
16   IA-32 and x64.
17 
18   @return The current value of ES.
19 
20 **/
21 UINT16
22 EFIAPI
AsmReadEs(VOID)23 AsmReadEs (
24   VOID
25   )
26 {
27   __asm {
28     xor     eax, eax
29     mov     ax, es
30   }
31 }
32 
33