#include <go32.h> extern __Go32_Info_Block _go32_info_block;
The go32 information block is a mechanism for `go32' to pass information to the application. Some of this information is generally useful, such as the pid or the transfer buffer, while some is used internally to `libc.a' only.
The structure has this format:
typedef struct { unsigned long size_of_this_structure_in_bytes; unsigned long linear_address_of_primary_screen; unsigned long linear_address_of_secondary_screen; unsigned long linear_address_of_transfer_buffer; unsigned long size_of_transfer_buffer; unsigned long pid; unsigned char master_interrupt_controller_base; unsigned char slave_interrupt_controller_base; unsigned short selector_for_linear_memory; unsigned long linear_address_of_stub_info_structure; unsigned long linear_address_of_original_psp; unsigned short run_mode; unsigned short run_mode_info; } Go32_Info_Block;
The linear address fields provide values that are suitable for
dosmemget
, dosmemput
, and movedata
. The
selector_for_linear_memory is suitable for <sys/farptr.h>
selector parameters.
Due to the length of these fields, and their popularity, the following macros are available:
_dos_ds
__tb
The run_mode
field indicates the mode that the program is running
in. The following modes are defined:
_GO32_RUN_MODE_UNDEF
_GO32_RUN_MODE_RAW
_GO32_RUN_MODE_XMS
_GO32_RUN_MODE_VCPI
emm386
or qemm
) is
managing both the CPU and the memory.
_GO32_RUN_MODE_DPMI
qdpmi
or Windows) is
managing both the CPU and memory. Programs may rely on this value
to determine if it is safe to use DPMI 0.9 functions.
If this value is set, the run_mode_info
field has the DPMI
specification version, in hex, shifted eight bits. For example, DPMI
0.9 has 0x005A in the run_mode_info
field.
Note that the program should not assume that the value will be one of the listed values. If the program is running with an extender that provides some other mode (say, a newly released extender) then the program should be able to handle that case gracefully.
not ANSI, not POSIX
dosmemget(_go32_info_block.linear_address_of_primary_screen, 80*25*2, buf);
Go to the first, previous, next, last section, table of contents.