no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
Previous revision | |||
— | en:ibm:prcp:vio:getmode [2016/09/15 05:11] (current) – valerius | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== VioGetMode ==== | ||
+ | |||
+ | **Bindings**: | ||
+ | |||
+ | This call returns the mode of the display. | ||
+ | |||
+ | // | ||
+ | |||
+ | // | ||
+ | Far address of a structure where mode characteristics are returned. | ||
+ | |||
+ | //length// (**USHORT**) | ||
+ | Input parameter to [[en: | ||
+ | |||
+ | //type// (**UCHAR**) | ||
+ | Mode characteristics bit mask: | ||
+ | |||
+ | ^Bit ^Description ^ | ||
+ | ^ ^ ^ | ||
+ | |7-4 |Reserved | | ||
+ | | | | | ||
+ | |3 |0 = VGA-compatible modes 0 thru 13H | | ||
+ | | | | | ||
+ | | |1 = Native mode | | ||
+ | | | | | ||
+ | |2 |0 = Enable color burst | | ||
+ | | | | | ||
+ | | |1 = Disable color burst | | ||
+ | | | | | ||
+ | |1 |0 = Text mode | | ||
+ | | | | | ||
+ | | |1 = Graphics mode | | ||
+ | | | | | ||
+ | |0 |0 = Monochrome compatible mode | | ||
+ | | | | | ||
+ | | |1 = Other. | | ||
+ | |||
+ | // | ||
+ | Number of colors defined as a power of 2. This is equivalent to the number of color bits that define the color, for example: | ||
+ | |||
+ | ^Value ^Definition ^ | ||
+ | |0 |Monochrome modes 7, 7+, and F. | | ||
+ | |1 |2 colors | | ||
+ | |2 |4 colors | | ||
+ | |4 |16 colors | | ||
+ | |8 |256 colors | | ||
+ | |||
+ | // | ||
+ | Number of text columns. | ||
+ | |||
+ | // | ||
+ | Number of text rows. | ||
+ | |||
+ | //pelcols// (**USHORT**) | ||
+ | Horizontal resolution, number of pel columns. | ||
+ | |||
+ | //pelrows// (**USHORT**) | ||
+ | Vertical resolution, number of pel rows. | ||
+ | |||
+ | //Attribute Format// (**UCHAR**) | ||
+ | Format of the attributes. | ||
+ | |||
+ | //Number of Attributes// | ||
+ | Number of attributes in a character cell. | ||
+ | |||
+ | //Buffer Address// (**ULONG**) | ||
+ | 32-bit physical address of the physical display buffer for this mode. | ||
+ | |||
+ | //Buffer Length// (**ULONG**) | ||
+ | Length of the physical display buffer for this mode. | ||
+ | |||
+ | //Full Buffer Size// (**ULONG**) | ||
+ | Size of the buffer required for a full save of the physical display buffer for this mode. | ||
+ | |||
+ | //Partial Buffer Size// (**ULONG**) | ||
+ | Size of the buffer required for a partial (pop-up) save of the physical display buffer for this mode. | ||
+ | |||
+ | //Extended Data Area Address// (**PCH**) | ||
+ | Far address to an extended mode data structure or zero if none. The format of the extended mode data structure is determined by the device driver and is unknown to OS/2. | ||
+ | |||
+ | // | ||
+ | Reserved word of 0s. | ||
+ | |||
+ | //rc// (**USHORT**) - return | ||
+ | Return code descriptions are: | ||
+ | |||
+ | |0 |NO_ERROR | | ||
+ | |436 |ERROR_VIO_INVALID_HANDLE | | ||
+ | |438 |ERROR_VIO_INVALID_LENGTH | | ||
+ | |465 |ERROR_VIO_DETACHED | | ||
+ | |494 |ERROR_VIO_EXTENDED_SG | | ||
+ | |||
+ | **Remarks** | ||
+ | |||
+ | Refer to [[en: | ||
+ | |||
+ | === C bindings === | ||
+ | |||
+ | <code c> | ||
+ | typedef struct _VIOMODEINFO { | ||
+ | USHORT cb; /* Length of the entire data structure | ||
+ | UCHAR fbType; | ||
+ | UCHAR color; | ||
+ | USHORT col; /* Number of text columns | ||
+ | USHORT row; /* Number of text rows */ | ||
+ | USHORT hres; /* Horizontal resolution | ||
+ | USHORT vres; /* Vertical resolution | ||
+ | UCHAR fmt_ID; | ||
+ | UCHAR attrib; | ||
+ | ULONG buf_addr; | ||
+ | ULONG buf_length; | ||
+ | ULONG full_length; | ||
+ | ULONG partial_length; | ||
+ | PCH ext_data_addr; | ||
+ | } VIOMODEINFO; | ||
+ | typedef VIOMODEINFO far *PVIOMODEINFO; | ||
+ | |||
+ | #define INCL_VIO | ||
+ | |||
+ | USHORT | ||
+ | |||
+ | PVIOMODEINFO | ||
+ | HVIO | ||
+ | |||
+ | USHORT | ||
+ | </ | ||
+ | |||
+ | === MASM bindings === | ||
+ | |||
+ | <code asm> | ||
+ | VIOMODEINFO struc | ||
+ | viomi_cb | ||
+ | viomi_fbType | ||
+ | viomi_color | ||
+ | viomi_col | ||
+ | viomi_row | ||
+ | viomi_hres | ||
+ | viomi_vres | ||
+ | viomi_fmt_ID | ||
+ | viomi_attrib | ||
+ | viomi_buf_addr | ||
+ | viomi_buf_length | ||
+ | viomi_full_length | ||
+ | viomi_partial_length dd ? ; | ||
+ | viomi_ext_data_addr | ||
+ | VIOMODEINFO ends | ||
+ | |||
+ | EXTRN VioGetMode: | ||
+ | INCL_VIO | ||
+ | |||
+ | PUSH@ OTHER | ||
+ | PUSH | ||
+ | CALL | ||
+ | |||
+ | Return WORD | ||
+ | </ | ||