VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/xorg-server-1.9.0/scoasm.h@ 61386

最後變更 在這個檔案從61386是 32163,由 vboxsync 提交於 14 年 前

Additions/x11/x11include: additional headers for building drivers for X.Org Server 1.9

  • 屬性 svn:eol-style 設為 native
檔案大小: 3.0 KB
 
1
2/*
3 * Copyright (c) 1996 by The XFree86 Project, Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 *
23 * Except as contained in this notice, the name of the copyright holder(s)
24 * and author(s) shall not be used in advertising or otherwise to promote
25 * the sale, use or other dealings in this Software without prior written
26 * authorization from the copyright holder(s) and author(s).
27 */
28
29/*
30 * scoasm.h - used to define inline versions of certain functions which
31 * do NOT appear in sys/inline.h.
32 */
33#ifdef HAVE_XORG_CONFIG_H
34#include <xorg-config.h>
35#endif
36
37#if defined(__SCO__) && defined(__USLC__)
38#ifndef _SCOASM_HDR_INC
39#define _SCOASM_HDR_INC
40
41asm void outl(port,val)
42{
43%reg port,val;
44 movl port, %edx
45 movl val, %eax
46 outl (%dx)
47%reg port; mem val;
48 movl port, %edx
49 movl val, %eax
50 outl (%dx)
51%mem port; reg val;
52 movw port, %dx
53 movl val, %eax
54 outl (%dx)
55%mem port,val;
56 movw port, %dx
57 movl val, %eax
58 outl (%dx)
59}
60
61asm void outw(port,val)
62{
63%reg port,val;
64 movl port, %edx
65 movl val, %eax
66 data16
67 outl (%dx)
68%reg port; mem val;
69 movl port, %edx
70 movw val, %ax
71 data16
72 outl (%dx)
73%mem port; reg val;
74 movw port, %dx
75 movl val, %eax
76 data16
77 outl (%dx)
78%mem port,val;
79 movw port, %dx
80 movw val, %ax
81 data16
82 outl (%dx)
83}
84
85asm void outb(port,val)
86{
87%reg port,val;
88 movl port, %edx
89 movl val, %eax
90 outb (%dx)
91%reg port; mem val;
92 movl port, %edx
93 movb val, %al
94 outb (%dx)
95%mem port; reg val;
96 movw port, %dx
97 movl val, %eax
98 outb (%dx)
99%mem port,val;
100 movw port, %dx
101 movb val, %al
102 outb (%dx)
103}
104
105asm int inl(port)
106{
107%reg port;
108 movl port, %edx
109 inl (%dx)
110%mem port;
111 movw port, %dx
112 inl (%dx)
113}
114
115asm int inw(port)
116{
117%reg port;
118 subl %eax, %eax
119 movl port, %edx
120 data16
121 inl (%dx)
122%mem port;
123 subl %eax, %eax
124 movw port, %dx
125 data16
126 inl (%dx)
127}
128
129asm int inb(port)
130{
131%reg port;
132 subl %eax, %eax
133 movl port, %edx
134 inb (%dx)
135%mem port;
136 subl %eax, %eax
137 movw port, %dx
138 inb (%dx)
139}
140
141#endif /* _SCOASM_HDR_INC */
142#endif /* __SCO__ && __USLC__ */
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette