man-pages/man2/vm86.2.html
2021-03-31 01:06:50 +01:00

120 lines
2.7 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of VM86</TITLE>
</HEAD><BODY>
<H1>VM86</H1>
Section: Linux Programmer's Manual (2)<BR>Updated: 2009-02-20<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
vm86old, vm86 - enter virtual 8086 mode
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>#include &lt;<A HREF="file:///usr/include/sys/vm86.h">sys/vm86.h</A>&gt;</B>
<P>
<B>int vm86old(struct vm86_struct *</B><I>info</I><B>);</B>
<P>
<B>int vm86(unsigned long </B><I>fn</I><B>, struct vm86plus_struct *</B><I>v86</I><B>);</B>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The system call
<B>vm86</B>()
was introduced in Linux 0.97p2.
In Linux 2.1.15 and 2.0.28, it was renamed to
<B>vm86old</B>(),
and a new
<B>vm86</B>()
was introduced.
The definition of
<I>struct vm86_struct</I>
was changed
in 1.1.8 and 1.1.9.
<P>
These calls cause the process to enter VM86 mode (virtual-8086 in Intel
literature), and are used by
<B>dosemu</B>.
<P>
VM86 mode is an emulation of real mode within a protected mode task.
<A NAME="lbAE">&nbsp;</A>
<H2>RETURN VALUE</H2>
On success, zero is returned.
On error, -1 is returned, and
<I>errno</I>
is set appropriately.
<A NAME="lbAF">&nbsp;</A>
<H2>ERRORS</H2>
<DL COMPACT>
<DT id="1"><B>EFAULT</B>
<DD>
This return value is specific to i386 and indicates a problem with getting
user-space data.
<DT id="2"><B>ENOSYS</B>
<DD>
This return value indicates the call is not implemented on the present
architecture.
<DT id="3"><B>EPERM</B>
<DD>
Saved kernel stack exists.
(This is a kernel sanity check; the saved
stack should exist only within vm86 mode itself.)
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>CONFORMING TO</H2>
This call is specific to Linux on 32-bit Intel processors,
and should not be used in programs intended to be portable.
<A NAME="lbAH">&nbsp;</A>
<H2>COLOPHON</H2>
This page is part of release 5.05 of the Linux
<I>man-pages</I>
project.
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="4"><A HREF="#lbAB">NAME</A><DD>
<DT id="5"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="6"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="7"><A HREF="#lbAE">RETURN VALUE</A><DD>
<DT id="8"><A HREF="#lbAF">ERRORS</A><DD>
<DT id="9"><A HREF="#lbAG">CONFORMING TO</A><DD>
<DT id="10"><A HREF="#lbAH">COLOPHON</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:35 GMT, March 31, 2021
</BODY>
</HTML>