OSDN Git Service

4109b51cde5948e72bfc243ecfa2f134a673b6f8
[linuxjm/LDP_man-pages.git] / original / man2 / vm86.2
1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" Copyright 1997 Andries E. Brouwer (aeb@cwi.nl)
3 .\"
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" %%%LICENSE_END
25 .\"
26 .TH VM86 2 2009-02-20 "Linux" "Linux Programmer's Manual"
27 .SH NAME
28 vm86old, vm86 \- enter virtual 8086 mode
29 .SH SYNOPSIS
30 .B #include <sys/vm86.h>
31 .sp
32 .BI "int vm86old(struct vm86_struct *" info );
33 .sp
34 .BI "int vm86(unsigned long " fn ", struct vm86plus_struct *" v86 );
35 .SH DESCRIPTION
36 The system call
37 .BR vm86 ()
38 was introduced in Linux 0.97p2.
39 In Linux 2.1.15 and 2.0.28, it was renamed to
40 .BR vm86old (),
41 and a new
42 .BR vm86 ()
43 was introduced.
44 The definition of
45 .IR "struct vm86_struct"
46 was changed
47 in 1.1.8 and 1.1.9.
48 .LP
49 These calls cause the process to enter VM86 mode (virtual-8086 in Intel
50 literature), and are used by
51 .BR dosemu .
52 .PP
53 VM86 mode is an emulation of real mode within a protected mode task.
54 .SH RETURN VALUE
55 On success, zero is returned.
56 On error, \-1 is returned, and
57 .I errno
58 is set appropriately.
59 .SH ERRORS
60 .TP
61 .B EFAULT
62 This return value is specific to i386 and indicates a problem with getting
63 user-space data.
64 .TP
65 .B ENOSYS
66 This return value indicates the call is not implemented on the present
67 architecture.
68 .TP
69 .B EPERM
70 Saved kernel stack exists.
71 (This is a kernel sanity check; the saved
72 stack should exist only within vm86 mode itself.)
73 .SH CONFORMING TO
74 This call is specific to Linux on 32-bit Intel processors,
75 and should not be used in programs intended to be portable.
76 .SH COLOPHON
77 This page is part of release 3.67 of the Linux
78 .I man-pages
79 project.
80 A description of the project,
81 information about reporting bugs,
82 and the latest version of this page,
83 can be found at
84 \%http://www.kernel.org/doc/man\-pages/.