VirtualBox

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

Last change on this file was 51223, checked in by vboxsync, 11 years ago

Additions/x11/x11include: added header files for X.Org Server 1.0 and 1.1.

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

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