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