VirtualBox

source: vbox/trunk/src/VBox/Additions/x11/x11include/XFree86-4.3/Xserver/scoasm.h

Last change on this file was 69098, checked in by vboxsync, 7 years ago

Clean up XFree86 driver header files.
bugref:3810: X11 Guest Additions maintenance
Over the years we have cleaned up the layout in the tree of the X.Org
header files we use to build drivers. The XFree86 ones were still in their
original, rather sub-optimal layout. This change fixes that.

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1/* $XFree86: xc/programs/Xserver/hw/xfree86/common/scoasm.h,v 3.0 1996/10/03 08:34:06 dawes Exp $ */
2
3/*
4 * scoasm.h - used to define inline versions of certain functions which
5 * do NOT appear in sys/inline.h.
6 */
7#ifdef SCO325
8#ifndef _SCOASM_HDR_INC
9#define _SCOASM_HDR_INC
10
11asm void outl(port,val)
12{
13%reg port,val;
14 movl port, %edx
15 movl val, %eax
16 outl (%dx)
17%reg port; mem val;
18 movl port, %edx
19 movl val, %eax
20 outl (%dx)
21%mem port; reg val;
22 movw port, %dx
23 movl val, %eax
24 outl (%dx)
25%mem port,val;
26 movw port, %dx
27 movl val, %eax
28 outl (%dx)
29}
30
31asm void outw(port,val)
32{
33%reg port,val;
34 movl port, %edx
35 movl val, %eax
36 data16
37 outl (%dx)
38%reg port; mem val;
39 movl port, %edx
40 movw val, %ax
41 data16
42 outl (%dx)
43%mem port; reg val;
44 movw port, %dx
45 movl val, %eax
46 data16
47 outl (%dx)
48%mem port,val;
49 movw port, %dx
50 movw val, %ax
51 data16
52 outl (%dx)
53}
54
55asm void outb(port,val)
56{
57%reg port,val;
58 movl port, %edx
59 movl val, %eax
60 outb (%dx)
61%reg port; mem val;
62 movl port, %edx
63 movb val, %al
64 outb (%dx)
65%mem port; reg val;
66 movw port, %dx
67 movl val, %eax
68 outb (%dx)
69%mem port,val;
70 movw port, %dx
71 movb val, %al
72 outb (%dx)
73}
74
75asm int inl(port)
76{
77%reg port;
78 movl port, %edx
79 inl (%dx)
80%mem port;
81 movw port, %dx
82 inl (%dx)
83}
84
85asm int inw(port)
86{
87%reg port;
88 subl %eax, %eax
89 movl port, %edx
90 data16
91 inl (%dx)
92%mem port;
93 subl %eax, %eax
94 movw port, %dx
95 data16
96 inl (%dx)
97}
98
99asm int inb(port)
100{
101%reg port;
102 subl %eax, %eax
103 movl port, %edx
104 inb (%dx)
105%mem port;
106 subl %eax, %eax
107 movw port, %dx
108 inb (%dx)
109}
110
111#endif /* _SCOASM_HDR_INC */
112#endif /* SCO325 */
Note: See TracBrowser for help on using the repository browser.

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