BIOSCALL(9) | NetBSD Kernel Developer's Manual (i386) | BIOSCALL(9) |
This function is intended to be called during the initial system bootstrap when necessary to probe devices or pseudo-devices.
The register values specified by *regs (with one exception) are installed before the BIOS interrupt is called. The processor flags are handled specially. Only the following flags are passed to the BIOS from the registers in regs (the remainder come from the processor's flags register at the time of the call): PSL_C, PSL_PF, PSL_AF, PSL_Z, PSL_N, PSL_D, PSL_V.
The bioscallregs structure is defined to contain structures for each register, to allow access to 32-, 16- or 8-bit wide sections of the registers. Definitions are provided which simplify access to the union members.
#include <i386/bioscall.h> #include <i386/apmvar.h> struct bioscallregs regs; regs.AX = APM_BIOS_FN(APM_INSTALLATION_CHECK); regs.BX = APM_DEV_APM_BIOS; regs.CX = regs.DX = 0; regs.ESI = regs.EDI = regs.EFLAGS = 0; bioscall(APM_SYSTEM_BIOS, ®s);
May 5, 2010 | NetBSD 5.99 |