MdePkg: Expand BaseIoLibIntrinsic (IoLib class) library
[mirror_edk2.git] / UefiCpuPkg / CpuIo2Dxe / Ia32 / IoFifo.asm
CommitLineData
fb8b5469
LE
1;------------------------------------------------------------------------------\r
2;\r
3; Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
4;\r
5; This program and the accompanying materials are licensed and made available\r
6; under the terms and conditions of the BSD License which accompanies this\r
7; distribution. The full text of the license may be found at\r
8; http://opensource.org/licenses/bsd-license.php.\r
9;\r
10; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12;\r
13;------------------------------------------------------------------------------\r
14\r
15 .586P\r
16 .model flat,C\r
17 .code\r
18\r
19;------------------------------------------------------------------------------\r
20; VOID\r
21; EFIAPI\r
22; IoReadFifo8 (\r
23; IN UINTN Port,\r
24; IN UINTN Size,\r
25; IN VOID *Buffer\r
26; );\r
27;------------------------------------------------------------------------------\r
28IoReadFifo8 PROC\r
29 push edi\r
30 cld\r
31 mov dx, [esp + 8]\r
32 mov ecx, [esp + 12]\r
33 mov edi, [esp + 16]\r
34rep insb\r
35 pop edi\r
36 ret\r
37IoReadFifo8 ENDP\r
38\r
39;------------------------------------------------------------------------------\r
40; VOID\r
41; EFIAPI\r
42; IoReadFifo16 (\r
43; IN UINTN Port,\r
44; IN UINTN Size,\r
45; IN VOID *Buffer\r
46; );\r
47;------------------------------------------------------------------------------\r
48IoReadFifo16 PROC\r
49 push edi\r
50 cld\r
51 mov dx, [esp + 8]\r
52 mov ecx, [esp + 12]\r
53 mov edi, [esp + 16]\r
54rep insw\r
55 pop edi\r
56 ret\r
57IoReadFifo16 ENDP\r
58\r
59;------------------------------------------------------------------------------\r
60; VOID\r
61; EFIAPI\r
62; IoReadFifo32 (\r
63; IN UINTN Port,\r
64; IN UINTN Size,\r
65; IN VOID *Buffer\r
66; );\r
67;------------------------------------------------------------------------------\r
68IoReadFifo32 PROC\r
69 push edi\r
70 cld\r
71 mov dx, [esp + 8]\r
72 mov ecx, [esp + 12]\r
73 mov edi, [esp + 16]\r
74rep insd\r
75 pop edi\r
76 ret\r
77IoReadFifo32 ENDP\r
78\r
79;------------------------------------------------------------------------------\r
80; VOID\r
81; EFIAPI\r
82; IoWriteFifo8 (\r
83; IN UINTN Port,\r
84; IN UINTN Size,\r
85; IN VOID *Buffer\r
86; );\r
87;------------------------------------------------------------------------------\r
88IoWriteFifo8 PROC\r
89 push esi\r
90 cld\r
91 mov dx, [esp + 8]\r
92 mov ecx, [esp + 12]\r
93 mov esi, [esp + 16]\r
94rep outsb\r
95 pop esi\r
96 ret\r
97IoWriteFifo8 ENDP\r
98\r
99;------------------------------------------------------------------------------\r
100; VOID\r
101; EFIAPI\r
102; IoWriteFifo16 (\r
103; IN UINTN Port,\r
104; IN UINTN Size,\r
105; IN VOID *Buffer\r
106; );\r
107;------------------------------------------------------------------------------\r
108IoWriteFifo16 PROC\r
109 push esi\r
110 cld\r
111 mov dx, [esp + 8]\r
112 mov ecx, [esp + 12]\r
113 mov esi, [esp + 16]\r
114rep outsw\r
115 pop esi\r
116 ret\r
117IoWriteFifo16 ENDP\r
118\r
119;------------------------------------------------------------------------------\r
120; VOID\r
121; EFIAPI\r
122; IoWriteFifo32 (\r
123; IN UINTN Port,\r
124; IN UINTN Size,\r
125; IN VOID *Buffer\r
126; );\r
127;------------------------------------------------------------------------------\r
128IoWriteFifo32 PROC\r
129 push esi\r
130 cld\r
131 mov dx, [esp + 8]\r
132 mov ecx, [esp + 12]\r
133 mov esi, [esp + 16]\r
134rep outsd\r
135 pop esi\r
136 ret\r
137IoWriteFifo32 ENDP\r
138\r
139 END\r
140\r