First import
[xorg_rtime.git] / xorg-server-1.4 / hw / xfree86 / common / scoasm.h
blob8f80e7b1e8d978cc51c5297f0cd2527147ee836b
2 /*
3 * Copyright (c) 1996 by The XFree86 Project, Inc.
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:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
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.
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).
30 * scoasm.h - used to define inline versions of certain functions which
31 * do NOT appear in sys/inline.h.
33 #ifdef HAVE_XORG_CONFIG_H
34 #include <xorg-config.h>
35 #endif
37 #if defined(__SCO__) && defined(__USLC__)
38 #ifndef _SCOASM_HDR_INC
39 #define _SCOASM_HDR_INC
41 asm void outl(port,val)
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)
61 asm void outw(port,val)
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)
85 asm void outb(port,val)
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)
105 asm int inl(port)
107 %reg port;
108 movl port, %edx
109 inl (%dx)
110 %mem port;
111 movw port, %dx
112 inl (%dx)
115 asm int inw(port)
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)
129 asm int inb(port)
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)
141 #endif /* _SCOASM_HDR_INC */
142 #endif /* __SCO__ && __USLC__ */