]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/vm86.2
5d14351af1039b0faea65511d36d0881c8149ec3
[thirdparty/man-pages.git] / man2 / vm86.2
1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\" Copyright 1997 Andries E. Brouwer (aeb@cwi.nl)
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .TH VM86 2 2021-03-22 "Linux" "Linux Programmer's Manual"
7 .SH NAME
8 vm86old, vm86 \- enter virtual 8086 mode
9 .SH LIBRARY
10 Standard C library
11 .RI ( libc ", " \-lc )
12 .SH SYNOPSIS
13 .nf
14 .B #include <sys/vm86.h>
15 .PP
16 .BI "int vm86old(struct vm86_struct *" info );
17 .BI "int vm86(unsigned long " fn ", struct vm86plus_struct *" v86 );
18 .fi
19 .SH DESCRIPTION
20 The system call
21 .BR vm86 ()
22 was introduced in Linux 0.97p2.
23 In Linux 2.1.15 and 2.0.28, it was renamed to
24 .BR vm86old (),
25 and a new
26 .BR vm86 ()
27 was introduced.
28 The definition of
29 .IR "struct vm86_struct"
30 was changed
31 in 1.1.8 and 1.1.9.
32 .PP
33 These calls cause the process to enter VM86 mode (virtual-8086 in Intel
34 literature), and are used by
35 .BR dosemu .
36 .PP
37 VM86 mode is an emulation of real mode within a protected mode task.
38 .SH RETURN VALUE
39 On success, zero is returned.
40 On error, \-1 is returned, and
41 .I errno
42 is set to indicate the error.
43 .SH ERRORS
44 .TP
45 .B EFAULT
46 This return value is specific to i386 and indicates a problem with getting
47 user-space data.
48 .TP
49 .B ENOSYS
50 This return value indicates the call is not implemented on the present
51 architecture.
52 .TP
53 .B EPERM
54 Saved kernel stack exists.
55 (This is a kernel sanity check; the saved
56 stack should exist only within vm86 mode itself.)
57 .SH CONFORMING TO
58 This call is specific to Linux on 32-bit Intel processors,
59 and should not be used in programs intended to be portable.