en:ibm:prcp:vio:getmode

Differences

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

Link to this comparison view

en:ibm:prcp:vio:getmode [2016/02/04 11:02] – created valeriusen:ibm:prcp:vio:getmode [2016/09/15 05:11] (current) valerius
Line 1: Line 1:
 ==== VioGetMode ==== ==== VioGetMode ====
  
-**Bindings**: C, MASM +**Bindings**: [[getmode#bindings|C]][[getmode#MASM bindings|MASM]]
  
 This call returns the mode of the display.  This call returns the mode of the display. 
Line 94: Line 94:
  
 Refer to [[en:ibm:prcp:vio:setmode|VioSetMode]] for examples.  Refer to [[en:ibm:prcp:vio:setmode|VioSetMode]] for examples. 
 +
 +=== C bindings ===
 +
 +<code c>
 +typedef struct _VIOMODEINFO {
 +  USHORT cb;                    /* Length of the entire data structure  */
 +  UCHAR  fbType;                /* Bit mask of mode being set           */
 +  UCHAR  color;                 /* Number of colors (power of 2)        */
 +  USHORT col;                   /* Number of text columns               */
 +  USHORT row;                   /* Number of text rows                  */
 +  USHORT hres;                  /* Horizontal resolution                */
 +  USHORT vres;                  /* Vertical resolution                  */
 +  UCHAR  fmt_ID;                /* Attribute format                     */
 +  UCHAR  attrib;                /* Number of attributes                 */
 +  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  rc = VioGetMode(ModeData, VioHandle);
 +
 +PVIOMODEINFO     ModeData;      /* Mode characteristics */
 +HVIO             VioHandle;     /* Vio handle */
 +
 +USHORT           rc;            /* return code */
 +</code>
 +
 +=== MASM bindings ===
 +
 +<code asm>
 +VIOMODEINFO struc
 +  viomi_cb             dw ? ;Length of the entire data structure
 +  viomi_fbType         db ? ;Bit mask of mode being set
 +  viomi_color          db ? ;Number of colors (power of 2)
 +  viomi_col            dw ? ;Number of text columns
 +  viomi_row            dw ? ;Number of text rows
 +  viomi_hres           dw ? ;Horizontal resolution
 +  viomi_vres           dw ? ;Vertical resolution
 +  viomi_fmt_ID         db ? ;Attribute format
 +  viomi_attrib         db ? ;Number of attributes
 +  viomi_buf_addr       dd ? ;
 +  viomi_buf_length     dd ? ;
 +  viomi_full_length    dd ? ;
 +  viomi_partial_length dd ? ;
 +  viomi_ext_data_addr  dd ? ;
 +VIOMODEINFO ends
 +
 +EXTRN  VioGetMode:FAR
 +INCL_VIO            EQU 1
 +
 +PUSH@  OTHER   ModeData      ;Mode characteristics
 +PUSH   WORD    VioHandle     ;Vio handle
 +CALL   VioGetMode
 +
 +Return WORD
 +</code>