i386_vm86 man page on NetBSD

Man page or keyword search:  
man Server   9087 pages
apropos Keyword Search (all sections)
Output format
NetBSD logo
[printable version]

I386_VM86(2)		 BSD/i386 System Calls Manual		  I386_VM86(2)

NAME
     i386_vm86 — set virtual 8086 processor registers and mode

LIBRARY
     i386 Architecture Library (libi386, -li386)

SYNOPSIS
     #include <sys/types.h>
     #include <signal.h>
     #include <machine/mcontext.h>
     #include <machine/segments.h>
     #include <machine/sysarch.h>
     #include <machine/vm86.h>

     int
     i386_vm86(struct vm86_struct *vmcp);

DESCRIPTION
     i386_vm86() will set the process into virtual 8086 mode using the regis‐
     ters and selectors specified by the context pointed to by vmcp.  The pro‐
     cessor registers are set from vmcp->substr.regs, and the emulated proces‐
     sor type from vmcp->substr.ss_cpu_type.

     The kernel keeps a pointer to the context, and uses the tables stored at
     vmcp->int_byuser and vmcp->int21_byuser for fast virtual interrupt han‐
     dling.  If the n th bit is clear in the first of these arrays, then the
     kernel may directly emulate the real-mode x86 INT n instruction handling.
     If the n th bit is set, then the process is delivered a signal when an
     INT instruction is executed.

     Since MS-DOS puts many DOS functions onto interrupt 21, it is handled
     specially:	 the k th bit in the vmcp->int21_byuser array is checked when
     INT 21 is requested and the ah register is k.

RETURN VALUES
     This routine does not normally return: 32-bit mode will be restored by
     the delivery of a signal to the process.  In case of an error in setting
     the VM86 mode, a value of -1 is returned and the global variable errno is
     set to indicate the error.

ERRORS
     i386_vm86() will fail if:

     [EFAULT]  The state at vmcp was not readable to the user process.

REFERENCES
     i386 Microprocessor Programmer's Reference Manual, Intel

BSD			       February 20, 1996			   BSD
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server NetBSD

List of man pages available for NetBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net