]>
Commit | Line | Data |
---|---|---|
ca162103 | 1 | title CpuIoAccess.asm\r |
2 | ;------------------------------------------------------------------------------\r | |
3 | ;\r | |
4 | ; Copyright (c) 2006 - 2007, Intel Corporation \r | |
5 | ; All rights reserved. This program and the accompanying materials \r | |
6 | ; are licensed and made available under the terms and conditions of the BSD License \r | |
7 | ; which accompanies this 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 | ; Module Name:\r | |
14 | ; CpuIoAccess.asm\r | |
15 | ; \r | |
16 | ; Abstract:\r | |
17 | ; CPU IO Abstraction\r | |
18 | ;\r | |
19 | ;------------------------------------------------------------------------------\r | |
20 | \r | |
21 | \r | |
22 | .code\r | |
23 | \r | |
24 | ;------------------------------------------------------------------------------\r | |
25 | ; UINT8\r | |
26 | ; CpuIoRead8 (\r | |
27 | ; UINT16 Port // rcx\r | |
28 | ; )\r | |
29 | ;------------------------------------------------------------------------------\r | |
30 | CpuIoRead8 PROC PUBLIC\r | |
31 | xor eax, eax\r | |
32 | mov dx, cx\r | |
33 | in al, dx\r | |
34 | ret\r | |
35 | CpuIoRead8 ENDP\r | |
36 | \r | |
37 | ;------------------------------------------------------------------------------\r | |
38 | ; VOID\r | |
39 | ; CpuIoWrite8 (\r | |
40 | ; UINT16 Port, // rcx\r | |
41 | ; UINT32 Data // rdx\r | |
42 | ; )\r | |
43 | ;------------------------------------------------------------------------------\r | |
44 | CpuIoWrite8 PROC PUBLIC\r | |
45 | mov eax, edx\r | |
46 | mov dx, cx\r | |
47 | out dx, al\r | |
48 | ret\r | |
49 | CpuIoWrite8 ENDP\r | |
50 | \r | |
51 | \r | |
52 | END\r |