faa22e97d455fc42ada55b98ecb8bfeb2cca083b
[mirror_edk2.git] / OvmfPkg / Library / QemuFwCfgLib / Ia32 / IoLibExAsm.nasm
1 ;------------------------------------------------------------------------------
2 ;
3 ; Copyright (c) 2006 - 2013, 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 ;------------------------------------------------------------------------------
13
14 SECTION .text
15
16 ;------------------------------------------------------------------------------
17 ; VOID
18 ; EFIAPI
19 ; IoReadFifo8 (
20 ; IN UINTN Port,
21 ; IN UINTN Size,
22 ; IN VOID *Buffer
23 ; );
24 ;------------------------------------------------------------------------------
25 global ASM_PFX(IoReadFifo8)
26 ASM_PFX(IoReadFifo8):
27
28 mov dx, [esp + 4]
29 mov ecx, [esp + 8]
30 push edi
31 mov edi, [esp + 16]
32 rep insb
33 pop edi
34 ret
35
36 ;------------------------------------------------------------------------------
37 ; VOID
38 ; EFIAPI
39 ; IoWriteFifo8 (
40 ; IN UINTN Port,
41 ; IN UINTN Size,
42 ; IN VOID *Buffer
43 ; );
44 ;------------------------------------------------------------------------------
45 global ASM_PFX(IoWriteFifo8)
46 ASM_PFX(IoWriteFifo8):
47
48 mov dx, [esp + 4]
49 mov ecx, [esp + 8]
50 push esi
51 mov esi, [esp + 16]
52 rep outsb
53 pop esi
54 ret
55