en:ibm:prcp:vio:getconfig

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

en:ibm:prcp:vio:getconfig [2016/02/04 09:52]
valerius created
en:ibm:prcp:vio:getconfig [2016/09/15 04:57] (current)
valerius
Line 1: Line 1:
 ==== VioGetConfig ==== ==== VioGetConfig ====
  
-**Bindings**:​ C, MASM +**Bindings**: ​[[getconfig#​bindings|C]][[getconfig#​MASM bindings|MASM]]
  
 This call returns the video display configuration. ​ This call returns the video display configuration. ​
Line 155: Line 155:
  
 The values returned may not be correct if the adapter cannot be properly identified by the Base Video Handler (BVH) selected at system installation time. It can also be incorrect if the physical setup does not match that indicated by the presence of the adapter or by adapter switches. For example, it is impossible to detect the absence of a display on a CGA or the display attached to an EGA, despite the setup switches. ​ The values returned may not be correct if the adapter cannot be properly identified by the Base Video Handler (BVH) selected at system installation time. It can also be incorrect if the physical setup does not match that indicated by the presence of the adapter or by adapter switches. For example, it is impossible to detect the absence of a display on a CGA or the display attached to an EGA, despite the setup switches. ​
 +
 +=== C bindings ===
 +
 +<code c>
 +typedef struct _VIOCONFIGINFO {  /* vioin  */
 +  USHORT ​ cb     ; ​              /* Length of this data structure */
 +  USHORT ​ adapter; ​              /* Display adapter type */
 +  USHORT ​ display; ​              /* Display/​monitor type */
 +  ULONG   ​cbMemory; ​             /* Amount of memory on the adapter
 +                                     in bytes */
 +  USHORT ​ Configuration;​
 +  USHORT ​ VDHVersion;
 +  USHORT ​ Flags;
 +  ULONG   ​HWBufferSize;​
 +  ULONG   ​FullSaveSize;​
 +  ULONG   ​PartSaveSize;​
 +  USHORT ​ EMAdaptersOFF; ​        /* Offset to emulated adapter types */
 +  USHORT ​ EMDisplaysOFF; ​        /* Offset to emulated display types */
 +} VIOCONFIGINFO;​
 +
 +#define INCL_VIO
 +
 +USHORT ​ rc = VioGetConfig(ConfigID,​ ConfigData, VioHandle);
 +
 +USHORT ​          ​ConfigID; ​     /* Configuration ID */
 +PVIOCONFIGINFO ​  ​ConfigData; ​   /* Configuration data */
 +HVIO             ​VioHandle; ​    /* Vio handle */
 +
 +USHORT ​          ​rc; ​           /* return code */
 +</​code>​
 +
 +=== MASM bindings ===
 +
 +<code asm>
 +VIOCONFIGINFO struc
 +  vioin_cb ​           dw  ? ;Length of this data structure
 +  vioin_adapter ​      ​dw ​ ? ;Display adapter type
 +  vioin_display ​      ​dw ​ ? ;​Display/​monitor type
 +  vioin_cbMemory ​     dd  ? ;Amount of memory on the adapter in bytes
 +  vioin_Configuration dw  ? ;
 +  vioin_VDHVersion ​   dw  ? ;
 +  vioin_Flags ​        ​dw ​ ? ;
 +  vioin_HWBufferSize ​ dd  ? ;
 +  vioin_FullSaveSize ​ dd  ? ;
 +  vioin_PartSaveSize ​ dd  ? ;
 +  vioin_EMAdaptersOFF dw  ? ;Offset to emulated adapter types
 +  vioin_EMDisplaysOFF dw  ? ;Offset to emulated display types
 +VIOCONFIGINFO ends
 +
 +EXTRN  VioGetConfig:​FAR
 +INCL_VIO ​           EQU 1
 +
 +PUSH   ​WORD ​   ConfigID ​     ;​Configuration ID
 +PUSH@  OTHER   ​ConfigData ​   ;​Configuration data
 +PUSH   ​WORD ​   VioHandle ​    ;Vio handle
 +CALL   ​VioGetConfig
 +
 +Returns WORD
 +</​code>​
  

en/ibm/prcp/vio/getconfig.txt · Last modified: 2016/09/15 04:57 by valerius