home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / INC / BVSPARMS.INC < prev    next >
Text File  |  1995-04-14  |  33KB  |  649 lines

  1. ;*DDK*************************************************************************/
  2. ;
  3. ; COPYRIGHT (C) Microsoft Corporation, 1989
  4. ; COPYRIGHT    Copyright (C) 1995 IBM Corporation
  5. ;
  6. ;    The following IBM OS/2 WARP source code is provided to you solely for
  7. ;    the purpose of assisting you in your development of OS/2 WARP device
  8. ;    drivers. You may use this code in accordance with the IBM License
  9. ;    Agreement provided in the IBM Device Driver Source Kit for OS/2. This
  10. ;    Copyright statement may not be removed.;
  11. ;*****************************************************************************/
  12. ;SCCSID = @(#)bvsparms.inc    6.4 91/08/01
  13. ;STJFMT,,16                             ;Formatting parms for STJFMT
  14. ; ****************************************************************************
  15. ; *                                                                          *
  16. ; *                                                                          *
  17. ; *                                                                          *
  18. ; ****************************************************************************
  19.  
  20. ; Parameter list used by all BVS routines
  21.  
  22. ParmList        STRUC                   ;Stack frame used by all BVS routines
  23.  
  24. ; Space reserved for the VDH parameter list by BVSMAIN
  25.  
  26. vp_parmlength   dw      ?               ;ParmList length (=8 by BVSMAIN)
  27. vp_flags        dw      ?               ;Flags           (=0 by BVSMAIN)
  28. vp_offset       dw      ?               ;Offset of data buffer   (if any)
  29. vp_selector     dw      ?               ;Selector of data buffer (if any)
  30. vp_parm1        dw      ?               ;1st variable VDH parameter
  31. vp_parm2        dw      ?               ;2nd variable VDH parameter
  32. vp_parm3        dw      ?               ;3rd variable VDH parameter
  33. vp_parm4        dw      ?               ;4th variable VDH parameter
  34. vp_parm5        dw      ?               ;5th variable VDH parameter
  35. vp_parm6        dw      ?               ;6th variable VDH parameter
  36. vp_parm7        dw      ?               ;7th variable VDH parameter
  37. vp_parm8        dw      ?               ;8th variable VDH parameter
  38. vp_parm9        dw      ?               ;9th variable VDH parameter
  39. vp_parm10       dw      ?               ;10th variable VDH parameter
  40. vp_parm11       dw      ?               ;11th variable VDH parameter
  41. vp_parm12       dw      ?               ;12th variable VDH parameter
  42. vp_parm13       dw      ?               ;13th variable VDH parameter
  43. vp_parm14       dw      ?               ;14th variable VDH parameter
  44. vp_parm15       dw      ?               ;15th variable VDH parameter
  45. vp_parm16       dw      ?               ;16th variable VDH parameter
  46. vp_parm17       dw      ?               ;17th variable VDH parameter
  47. vp_parm18       dw      ?               ;18th variable VDH parameter
  48. vp_parm19       dw      ?               ;19th variable VDH parameter
  49. vp_parm20       dw      ?               ;20th variable VDH parameter ;D261
  50.  
  51. ; Registers saved for all BVS routines by BVSMAIN
  52.  
  53. ;*********  MUST MATCH oldstackframe Struc in BVSCB.INC ***********************
  54. ;*********  if the following structure changes, then BVSCB.INC needs to be    *
  55. ;*********  updated and the statement below may need to change also           *
  56. ;*********  'lea     bp,[si].p_regfs' in EXTVIO (wdhmain.asm)        **********
  57.  
  58. p_regfs         dw      ?               ;Reg FS save area ;@D549
  59. p_reges         dw      ?               ;Reg ES save area
  60. p_regds         dw      ?               ;Reg DS save area
  61. p_regdi         dw      ?               ;Reg DI save area
  62. p_regsi         dw      ?               ;Reg SI save area
  63. p_regbp         dw      ?               ;Reg BP save area
  64. p_regsp         dw      ?               ;Reg SP save area
  65. p_regbx         dw      ?               ;Reg BX save area
  66. p_regdx         dw      ?               ;Reg DX save area
  67. p_regcx         dw      ?               ;Reg CX save area
  68. p_regax         dw      ?               ;Reg AX save area
  69. p_regfl         dw      ?               ;Reg FL save area ;D198
  70.  
  71. ; Parameters on stack at entry to BVSMAIN
  72.  
  73. p_vioroutip     dw      ?               ;VIOROUT return offset
  74. p_vioroutcs     dw      ?               ;VIOROUT return selector
  75. p_vioroutds     dw      ?               ;VIOROUT data selector
  76. p_vioip         dw      ?               ;VIOxxx return offset
  77. p_viofunc       dw      ?               ;VIOxxx Function code
  78. p_userip        dw      ?               ;User return offset
  79. p_usercs        dw      ?               ;User return segment
  80. p_viohandle     dw      ?               ;Vio Device Handle
  81. p_parmn         dw      ?               ;Nth parameter
  82. p_parmnm1       dw      ?               ;(N-1)st parameter
  83. p_parmnm2       dw      ?               ;(N-2)nd parameter
  84. p_parmnm3       dw      ?               ;(N-3)rd parameter
  85. p_parmnm4       dw      ?               ;(N-4)th parameter
  86. p_parmnm5       dw      ?               ;(N-5)th parameter
  87. p_parmnm6       dw      ?               ;(N-6)th parameter
  88. p_parmnm7       dw      ?               ;(N-7)th parameter
  89. p_parmnm8       dw      ?               ;(N-8)th parameter
  90. p_parmnm9       dw      ?               ;(N-9)th parameter
  91.  
  92. ParmList        ENDS
  93.  
  94. ; Stack frame used by all VDH routines
  95.  
  96. p_vdh_retaddr   equ     p_vioroutip     ;Return Address ;D198
  97. p_vdh_function  equ     p_vioroutds     ;Function Number ;D198
  98. p_vdh_parmblock equ     p_viofunc       ;Parameter Block Address ;D198
  99. p_vdh_envblock  equ     p_usercs        ;Environment Block Address ;D198
  100.  
  101. ; Equates used by most BVS routines or initialization
  102.  
  103. p_offset        equ     p_parmn         ;Offset of parameter block
  104. p_selector      equ     p_parmnm1       ;Selector of parameter block
  105.  
  106. vp_f_physical   equ     0001h           ;Update physical buffer/hardware
  107. vp_f_3xBox      equ     0002h           ;Initialize the 3xBox ;D198
  108.  
  109. ; Values for VioFunc, set by VioCalls
  110.  
  111. vf_GetPhysBuf   equ     00h             ;00 = VioGetPhysBuf
  112. vf_GetBuf       equ     01h             ;01 = VioGetBuf
  113. vf_ShowBuf      equ     02h             ;02 = VioShowBuf
  114. vf_GetCurPos    equ     03h             ;03 = VioGetCurPos
  115. vf_GetCurType   equ     04h             ;04 = VioGetCurType
  116. vf_GetMode      equ     05h             ;05 = VioGetMode
  117. vf_SetCurPos    equ     06h             ;06 = VioSetCurPos
  118. vf_SetCurType   equ     07h             ;07 = VioSetCurType
  119. vf_SetMode      equ     08h             ;08 = VioSetMode
  120. vf_ReadCharStr  equ     09h             ;09 = VioReadCharStr
  121. vf_ReadCellStr  equ     0Ah             ;10 = VioReadCellStr
  122. vf_WrtNChar     equ     0Bh             ;11 = VioWrtNChar
  123. vf_WrtNAttr     equ     0Ch             ;12 = VioWrtNAttr
  124. vf_WrtNCell     equ     0Dh             ;13 = VioWrtNCell
  125. vf_WrtCharStr   equ     0Eh             ;14 = VioWrtCharStr
  126. vf_WrtCharStrAtt equ    0Fh             ;15 = VioWrtCharStrAtt
  127. vf_WrtCellStr   equ     10h             ;16 = VioWrtCellStr
  128. vf_WrtTTY       equ     11h             ;17 = VioWrtTTY
  129. vf_ScrollUp     equ     12h             ;18 = VioScrollUp
  130. vf_ScrollDn     equ     13h             ;19 = VioScrollDn
  131. vf_ScrollLf     equ     14h             ;20 = VioScrollLf
  132. vf_ScrollRt     equ     15h             ;21 = VioScrollRt
  133. vf_SetAnsi      equ     16h             ;22 = VioSetAnsi
  134. vf_GetAnsi      equ     17h             ;23 = VioGetAnsi
  135. vf_PrtSc        equ     18h             ;24 = VioPrtSc
  136. vf_Save2        equ     19h             ;25 = VioSave2
  137. vf_Restore2     equ     1Ah             ;26 = VioRestore2
  138. vf_Free2        equ     1Bh             ;27 = VioFree2
  139. vf_TogglePrtSc  equ     1Fh             ;31 = VioTogglePrtSc
  140. vf_GetFont      equ     22h             ;34 = VioGetFont
  141. vf_GetConfig    equ     23h             ;35 = VioGetConfig
  142. vf_SetCP        equ     24h             ;36 = VioSetCP
  143. vf_GetCP        equ     25h             ;37 = VioGetCP
  144. vf_SetFont      equ     26h             ;38 = VioSetFont
  145. vf_GetState     equ     27h             ;39 = VioGetState
  146. vf_SetState     equ     28h             ;40 = VioSetState
  147. vf_CreateCA     equ     2Ch             ;44 = XVioCreateCA
  148. vf_GetCAState   equ     2Dh             ;45 = XVioGetCAState
  149. vf_SetCAState   equ     2Eh             ;46 = XVioSetCAState
  150. vf_DestroyCA    equ     2Fh             ;47 = XVioDestroyCA
  151. vf_CheckCharType equ    30h             ;48 = VioCheckCharType/XVioCheckCharType
  152. vf_Save         equ     41h             ;65 = VioSave
  153. vf_Restore      equ     42h             ;66 = VioRestore
  154. vf_Free         equ     43h             ;67 = VioFree
  155. vf_ShellInit    equ     44h             ;68 = VioShellInit
  156. vf_NextAvail    equ     31h             ;49 = Next Available Base Vio
  157.  
  158. vf_AssociateDC  equ     50h             ;80 = VioAssociate
  159. vf_CreatePS     equ     51h             ;81 = Create Presentation Space
  160. vf_DeleteSetId  equ     52h             ;82 =
  161. vf_DestroyPS    equ     53h             ;83 = Destroy Presentation Space
  162. vf_GetDevCellSz equ     54h             ;84 =
  163. vf_GetOrg       equ     55h             ;85 =
  164. vf_CreateLogFont equ    56h             ;86 =
  165. vf_QuerySetIds  equ     57h             ;87 =
  166. vf_QueryFonts   equ     58h             ;88 =
  167. vf_SetDevCellSz equ     59h             ;89 =
  168. vf_SetOrg       equ     5Ah             ;90 =
  169. vf_ShowPS       equ     5Bh             ;91 =
  170. vf_GetPSAddress equ     5Ch             ;92 =
  171.  
  172. vf_ShieldInit   equ     60h             ;96 =
  173. vf_ShieldTerm   equ     61h             ;97 =
  174. vf_QueryConsole equ     62h             ;98 =
  175.  
  176. ; Function Numbers for VDH Routines
  177.  
  178. fn_BufferUpdate equ     100h            ;256 = Text Buffer Update
  179. fn_InitEnv      equ     101h            ;257 = Initialize Environment
  180. fn_SaveEnv      equ     102h            ;258 = Save Environment
  181. fn_RestoreEnv   equ     103h            ;259 = Restore Environment
  182. fn_GetConfig    equ     104h            ;260 = Return Config Info
  183. fn_GetDBCSInfo  equ     105h            ;261 = Get DBCS Display Info
  184. fn_GetCLUT      equ     106h            ;262 = Get Color Lookup Table
  185. fn_SetCLUT      equ     107h            ;263 = Set Color Lookup Table
  186. fn_GetCursor    equ     108h            ;264 = Get Cursor Info
  187. fn_SetCursor    equ     109h            ;265 = Set Cursor Info
  188. fn_GetFont      equ     10Ah            ;266 = Get Font
  189. fn_SetFont      equ     10Bh            ;267 = Set Font
  190. fn_GetMode      equ     10Ch            ;268 = Get Mode
  191. fn_SetMode      equ     10Dh            ;269 = Set Mode
  192. fn_GetPalette   equ     10Eh            ;270 = Get Palette Registers
  193. fn_SetPalette   equ     10Fh            ;271 = Set Palette Registers
  194. fn_GetPhysBuf   equ     110h            ;272 = Get Phys Buf
  195. fn_FreePhysBuf  equ     111h            ;273 = Free Phys Buf
  196. fn_GetVarInfo   equ     112h            ;274 = Get Variable Info
  197. fn_SetVarInfo   equ     113h            ;275 = Set Variable Info
  198. fn_ExtVIO       equ     114h            ;276 = Extended VIO Calls
  199. fn_PrintScreen  equ     115h            ;277 = Print Screen ;D198
  200. fn_WriteTTY     equ     116h            ;278 = Write TTY ;D198
  201. fn_GetLVBInfo   equ     117h            ;279 = Get LVB Info
  202. fn_GetState     equ     118h            ;280 = get video state          ;D811
  203. fn_SetState     equ     119h            ;281 = set video state          ;D811
  204. fn_NextAvail    equ     11Ah            ;282 = Next Available Func. #   ;D811
  205.  
  206. ; Additional VDH Buffer Update parameters
  207.  
  208. vp_secondoff    equ     vp_parm1        ;Offset of second data item
  209. vp_secondsel    equ     vp_parm2        ;Selector of second data item
  210. vp_index        equ     vp_parm3        ;Index of subroutine (see x_* below)
  211. vp_startrow     equ     vp_parm4        ;Starting row
  212. vp_startcol     equ     vp_parm5        ;Starting column
  213. vp_secondrow    equ     vp_parm6        ;Second row
  214. vp_secondcol    equ     vp_parm7        ;Second column
  215. vp_repeatlength equ     vp_parm8        ;Repeat factor or length of string
  216. vp_lvbsel       equ     vp_parm9        ;Selector of Logical Buffer
  217. vp_touchxleft   equ     vp_parm10       ;Left most column affected by write
  218. vp_touchytop    equ     vp_parm11       ;Top most row affected by write
  219. vp_touchxright  equ     vp_parm12       ;Left most column affected by write
  220. vp_touchybottom equ     vp_parm13       ;Bottom most row affected by write
  221. vp_lvbrowoff    equ     vp_parm14       ;Screen row offset of LVB in cells
  222. vp_lvbcoloff    equ     vp_parm15       ;Screen row offset of LVB in cells
  223. vp_lvbwidth     equ     vp_parm16       ;Width of LVB in cells
  224. vp_lvbheight    equ     vp_parm17       ;Height of LVB in cells
  225. vp_lvbfidattr   equ     vp_parm18       ;Format ID and attribute count of LVB
  226.  
  227. vp_f_logical    equ     0002h           ;Update logical buffer/hardware
  228. vp_f_attrxlate  equ     0004h           ;Attribute translation required
  229.  
  230. ; Indexes for VDH Buffer Update subroutines
  231.  
  232. sx_ReadCellTypes equ    0
  233. sx_ReadCharStr  equ     1
  234. sx_ReadCellStr  equ     2
  235. sx_ScrollUp     equ     3
  236. sx_ScrollDn     equ     4
  237. sx_ScrollLf     equ     5
  238. sx_ScrollRt     equ     6
  239. sx_WriteCellStr equ     7
  240. sx_WriteCharStr equ     8
  241. sx_WriteCharStrAtt equ  9
  242. sx_WriteNChar   equ     10
  243. sx_WriteNAttr   equ     11
  244. sx_WriteNCell   equ     12
  245. sx_CopyRect     equ     13
  246.  
  247. ; Additional VDH Variable Info parameters
  248.  
  249. vp_blink        equ     vp_offset       ;Blink state
  250. vp_border       equ     vp_selector     ;Border color
  251. vp_underscore   equ     vp_parm1        ;Underscore line
  252. vp_enable       equ     vp_parm2        ;Video Enable/Disable state
  253. vp_dispmask1    equ     vp_parm3        ;Display mask (bits 0-15)
  254. vp_dispmask2    equ     vp_parm4        ;Display mask (bits 16-31)
  255. vp_codepage     equ     vp_parm5        ;Codepage
  256. vp_scrlleft     equ     vp_parm6        ;Video Enable/Disable state
  257. vp_scrltop      equ     vp_parm7        ;Display mask (bits 0-15)
  258. vp_scrlright    equ     vp_parm8        ;Display mask (bits 16-31)
  259. vp_scrlbottom   equ     vp_parm9        ;Codepage
  260. vp_scrnrows     equ     vp_parm10       ;Video Enable/Disable state
  261. vp_scrncols     equ     vp_parm11       ;Display mask (bits 0-15)
  262. vp_videopage    equ     vp_parm12       ;Current video page             @C32
  263.  
  264. vp_f_blink      equ     0002h           ;Blink state requested
  265. vp_f_border     equ     0004h           ;Border color requested
  266. vp_f_underscore equ     0008h           ;Underscore requested
  267. vp_f_enable     equ     0010h           ;Video Enable/Disable requested
  268. vp_f_dispmask   equ     0020h           ;Display Mask requested
  269. vp_f_codepage   equ     0040h           ;Codepage requested
  270. vp_f_forcecp    equ     0080h           ;Force Codepage set (change DBCS mode)
  271. vp_f_scrlrect   equ     0100h           ;Scrollable rectangle
  272. vp_f_scrndim    equ     0200h           ;Actual screen dimensions
  273.  
  274. ;Equates for Bvs?etAnsi routines
  275.  
  276. ansi_parm       equ     p_parmn         ;New value for the ansi_on flag
  277.  
  278. ;Equates used by BvsGetBuf routine
  279.  
  280. gb_offset       equ     p_parmnm2       ;Offset of address ptr
  281. gb_selector     equ     p_parmnm3       ;Selector of address ptr
  282.  
  283. ;Equates used by BvsGetConfig routine
  284.  
  285. gc_confignum    equ     p_parmnm2       ;Requested config number
  286.  
  287. configdata      struc
  288. cf_length       dw      40              ;Length of control block (=40) ;@BB7
  289. cf_adapter      dw      0               ;Adapter type
  290. cf_display      dw      0               ;Display type
  291. cf_memory       dd      0               ;Memory on adapter
  292. cf_confignum    dw      0               ;Configuration number
  293. cf_version      dw      0               ;VDH version number
  294. cf_flags        dw      0               ;Flags
  295. cf_envsize      dd      0               ;Environment Buffer size
  296. cf_fullsize     dd      0               ;Full save size
  297. cf_partsize     dd      0               ;Partial save size
  298. cf_adapteroff   dw      0               ;Offset to emulated adapters
  299. cf_displayoff   dw      0               ;Offset to emulated displays
  300. ;Following fields are in default location only
  301. cf_lemadapterdata  dw      1            ;Length of emulated adapter data (words) ;@BB7
  302. cf_emadapters      dw      0            ;Emulated adapters
  303. cf_lemdisplaydata  dw      1            ;Length of emulated display data (words) ;@BB7
  304. cf_emdisplays      dw      0            ;Emulated displays
  305. configdata      ends
  306.  
  307. cf_a_mpa        equ     0               ;Adapter type = MPA
  308. cf_a_cga        equ     1               ;Adapter type = CGA
  309. cf_a_ega        equ     2               ;Adapter type = EGA
  310. cf_a_vga        equ     3               ;Adapter type = VGA
  311. cf_a_8514a      equ     7               ;Adapter type = 8514A
  312. cf_a_xga        equ     9               ;Adapter type = XGA             ;@T72
  313.  
  314. cf_af_mpa       equ     0001h           ;Adapter type flag = MPA
  315. cf_af_cga       equ     0002h           ;Adapter type flag = CGA
  316. cf_af_ega       equ     0004h           ;Adapter type flag = EGA
  317. cf_af_vga       equ     0008h           ;Adapter type flag = VGA
  318. cf_af_8514a     equ     0080h           ;Adapter type flag = 8514A
  319. cf_af_xga       equ     0200h           ;Adapter type flag = XGA        ;@T72f
  320.  
  321. cf_d_mono       equ     0               ;Display type = Monochrome
  322. cf_d_color      equ     1               ;Display type = Color
  323. cf_d_ecolor     equ     2               ;Display type = Enhanced Color
  324. cf_d_vmono      equ     3               ;Display type = VGA Monochrome
  325. cf_d_vcolor     equ     4               ;Display type = VGA Color
  326. cf_d_8514       equ     9               ;Display type = 8514
  327. cf_d_plasma     equ     10              ;Display type = Plasma
  328. cf_d_8507_8604  equ     11              ;Display type = 8507/8604 ;D184
  329. cf_d_8515       equ     12              ;Display type = 8515 ;D184
  330.  
  331. cf_df_mono      equ     0001h           ;Display type flag = Monochrome
  332. cf_df_color     equ     0002h           ;Display type flag = Color
  333. cf_df_ecolor    equ     0004h           ;Display type flag = Enhanced Color
  334. cf_df_vmono     equ     0008h           ;Display type flag = VGA Monochrome
  335. cf_df_vcolor    equ     0010h           ;Display type flag = VGA Color
  336. cf_df_8514      equ     0200h           ;Display type flag = 8514
  337. cf_df_plasma    equ     0400h           ;Display type flag = Plasma
  338. cf_df_8507_8604 equ     0800h           ;Display type flag = 8507/8604 ;D184
  339. cf_df_8515      equ     1000h           ;Display type flag = 8515 ;D184
  340.  
  341. ;Equates for Bvs?etCP routines
  342.  
  343. cp_cpid         equ     p_parmn         ;New code page id
  344.  
  345. ;Equates for Bvs?etCur* routines
  346.  
  347. c_col           equ     p_parmn         ;Column
  348. c_row           equ     p_parmnm1       ;Row
  349. c_coloff        equ     p_parmn         ;Offset of column
  350. c_colsel        equ     p_parmnm1       ;Selector of column
  351. c_rowoff        equ     p_parmnm2       ;Offset of row
  352. c_rowsel        equ     p_parmnm3       ;Selector of row
  353.  
  354. vp_f_curpos     equ     0002h           ;Cursor position request
  355. vp_f_curtype    equ     0004h           ;Cursor type request
  356.  
  357. vp_c_row        equ     vp_offset       ;Row of cursor
  358. vp_c_col        equ     vp_selector     ;Column of cursor
  359. vp_c_startline  equ     vp_parm1        ;Starting scan line of cursor
  360. vp_c_endline    equ     vp_parm2        ;Ending scan line of cursor
  361. vp_c_width      equ     vp_parm3        ;Width of cursor
  362. vp_c_attr       equ     vp_parm4        ;Attribute of cursor
  363.  
  364. cursordata      STRUC                   ;Cursor data structure
  365. cursor_start    dw      0               ;Current cursor start line
  366. cursor_end      dw      0               ;Current cursor end line
  367. cursor_width    dw      0               ;Current cursor width
  368. cursor_attr     dw      0               ;Current cursor attribute
  369. cursordata      ENDS
  370.  
  371. ;Parameter block passed to Bvs?etFont
  372.  
  373. fontparms       STRUC
  374. fp_rblength     dw      14              ;Length of request block (=14)
  375. fp_reqtype      dw      0               ;Request type
  376. fp_cols         dw      0               ;Character pel columns
  377. fp_rows         dw      0               ;Character pel rows
  378. fp_offset       dw      0               ;Offset of Font
  379. fp_selector     dw      0               ;Selector of Font
  380. fp_length       dw      0               ;Length of Font
  381. fontparms       ENDS
  382.  
  383. vp_fp_length    equ     vp_parm1        ;Font length
  384. vp_fp_cols      equ     vp_parm2        ;# columns per character
  385. vp_fp_rows      equ     vp_parm3        ;# rows per character
  386.  
  387. ;Equates used by BvsFree routine
  388.  
  389. fr_sgnum        equ     p_viohandle     ;Screen group to be freed
  390.  
  391. ;Equates used by GetLVBInfo
  392.  
  393. vp_li_fidatt    equ     vp_offset       ;Format ID/Attribute Count
  394. vp_li_width     equ     vp_selector     ;Width of the LVB
  395. vp_li_height    equ     vp_parm1        ;Height of the LVB
  396. vp_li_allocl    equ     vp_parm2        ;Low word of the LVB allocation size
  397. vp_li_alloch    equ     vp_parm3        ;High word of the LVB allocation size
  398. vp_li_attrsize  equ     vp_parm4        ;Byte of space for the default attribute
  399. vp_li_attroffst equ     vp_parm5        ;Offset of default attribute buffer
  400. vp_li_attrseg   equ     vp_parm6        ;Segment of default attribute buffer
  401.  
  402. ;Equates used by GetDBCSInfo
  403.  
  404. vp_di_tbllen    equ     vp_offset       ;length of the table
  405. vp_di_tbloff    equ     vp_selector     ;offset to the beginning of the table
  406. vp_di_codepage  equ     vp_parm1        ;Beginning of table
  407. vp_di_table     equ     vp_parm2        ;Beginning of table
  408. di_tblbuflen    equ     vp_parm19-vp_parm1 ;Number of bytes for table
  409. di_totallen     equ     vp_parm19-vp_parmlength+2 ;# of bytes in parm block
  410.  
  411. ;Equates used by Bvs?etMode routines
  412.  
  413. modedata        STRUC                   ;Mode data structure
  414. mode_datalen    dw      34              ;Length of mode data (=34)
  415. mode_type       db      0               ;Type for Mode
  416. mode_colors     db      0               ;Colors for Mode
  417. mode_cols       dw      0               ;Number of screen columns for text
  418. mode_rows       dw      0               ;Number of screen rows for text
  419. mode_gcols      dw      0               ;Number of screen columns for graphics
  420. mode_grows      dw      0               ;Number of screen rows for graphics
  421. mode_attrformat db      0               ;Attribute format
  422. mode_attrbytes  db      0               ;Number of attribute bytes
  423. mode_bufaddr    dd      0               ;Address of video buffer
  424. mode_bufsize    dd      0               ;Size of video buffer
  425. mode_fullbufsz  dd      0               ;Full buffer save size
  426. mode_partbufsz  dd      0               ;Partial buffer save size
  427. mode_extdata    dd      0               ;Extended mode data address
  428. modedata        ENDS
  429.  
  430. ;Mode type flags
  431.  
  432. mode_f_color    equ     001h            ;Color display flag
  433. mode_f_graphics equ     002h            ;Graphics flag
  434. mode_f_uncolor  equ     004h            ;Suppress color
  435. mode_f_afmode   equ     008h            ;Advance Function mode
  436.  
  437. ;Equates for BvsGetPhysBuf
  438.  
  439. physdata        STRUC                   ;PhysBuf Control Block
  440. pd_bufaddrl     dw      0               ;Low word of buffer address
  441. pd_bufaddrh     dw      0               ;High word of buffer address
  442. pd_buflenl      dw      0               ;Low word of buffer length
  443. pd_buflenh      dw      0               ;High word of buffer length
  444. pd_prisel       dw      0               ;Primary buffer selector
  445. pd_secsel       dw      0               ;Secondary buffer selector
  446. physdata        ENDS
  447.  
  448. physblock       STRUC                   ;PhysBuf Control Block
  449. pb_length       dw      4               ;Length of this data
  450. pb_selector     dw      0               ;First selector in the list
  451. physblock       ENDS
  452.  
  453. vp_fpb_selector equ     vp_offset       ;Selector to be freed by VDH
  454.  
  455. ;Equates for BvsPrtSc routine
  456.  
  457. vp_pr_lvbsel    equ     vp_offset       ;LVB selector ;D198
  458. vp_pr_handle    equ     vp_selector     ;Printer handle ;D198
  459.  
  460. ;Equates for BvsRead* routines
  461.  
  462. r_col           equ     p_parmn         ;Column
  463. r_row           equ     p_parmnm1       ;Row
  464. r_lenoff        equ     p_parmnm2       ;Offset of Length
  465. r_lensel        equ     p_parmnm3       ;Selector of Length
  466. r_stroff        equ     p_parmnm4       ;Offset of String
  467. r_strsel        equ     p_parmnm5       ;Selector of String
  468.  
  469. ;Equates for BvsCheckCharType routine
  470.  
  471. ct_col          equ     p_parmn         ; column of cell to be examined
  472. ct_row          equ     p_parmnm1       ; row of cell to be examined
  473. ct_typeoff      equ     p_parmnm2       ; offset of type return buffer address
  474. ct_typesel      equ     p_parmnm3       ; segment of type return buffer address
  475.  
  476. ;Equates used by BvsSave/Restore routines
  477.  
  478. sr_type         equ     p_viohandle     ;Type of save/restore
  479. sr_sgnum        equ     p_parmn         ;Screen group to be saved/restored
  480.  
  481. sr_f_popup      equ     0001h           ;Popup type flag
  482.  
  483. vp_f_hardware   equ     0002h           ;Hardware state to be saved/restored
  484. vp_f_full       equ     0004h           ;Full buffer save/restore
  485. vp_f_partial    equ     0008h           ;Partial buffer save/restore
  486. vp_f_saveVDM    equ     0010h           ;MVDM save                      @C39
  487. not_readable_hardware   equ     0FFFFh  ;Special saveenv return code    @C39
  488.  
  489. vp_sr_lvbsel    equ     vp_offset       ;First selector of huge LVB
  490.  
  491. ;Equates used by BvsScroll* routines
  492.  
  493. s_celloff       equ     p_parmn         ;Offset of fill Cell
  494. s_cellsel       equ     p_parmnm1       ;Selector of fill Cell
  495. s_times         equ     p_parmnm2       ;Number of times to scroll
  496. s_rightcol      equ     p_parmnm3       ;Rightmost column of window
  497. s_botrow        equ     p_parmnm4       ;Bottom row of window
  498. s_leftcol       equ     p_parmnm5       ;Leftmost column of window
  499. s_toprow        equ     p_parmnm6       ;Top row of window
  500.  
  501. ;Equates used by BvsShowBuf routine
  502.  
  503. sb_length       equ     p_parmn         ;Length of data to show
  504. sb_offset       equ     p_parmnm1       ;Starting offset in LVB
  505.  
  506. ;Parameter block passed to Bvs?etState
  507.  
  508. stateparms      STRUC
  509. sp_rblength     dw      12              ;Request block length (=12)
  510. sp_reqtype      dw      0               ;Request type
  511. sp_data         dw      0               ;Data word
  512. sp_palregs      dw      0               ;First palette register
  513. sp_offset       dw      0               ;Offset of data area
  514. sp_selector     dw      0               ;Selector of data area
  515. stateparms      ENDS
  516.  
  517. sp_firstreg     equ     sp_data         ;Index of first register
  518. sp_numregs      equ     sp_palregs      ;Number of registers
  519. sp_dispmask1    equ     sp_data         ;Display mask (bits 0-15)
  520. sp_dispmask2    equ     sp_palregs      ;Display mask (bits 16-31)
  521. sp_oemoffset    equ     sp_data         ;OEM defined data offset        ;D811
  522. sp_oemselector  equ     sp_palregs      ;OEM defined data selector      ;D811
  523.  
  524. STATE_OEMFUNCTIONS      EQU  8000h      ;Get/Setstate user defined func ;D811
  525.  
  526. vp_sp_index     equ     vp_parm1        ;Index of first register
  527. vp_sp_number    equ     vp_parm2        ;Number of registers
  528.  
  529. ;Equates for the BvsWrtTTY routine
  530.  
  531. tty_length      equ     p_parmn         ;Length of String
  532. tty_stroff      equ     p_parmnm1       ;Offset of String
  533. tty_strsel      equ     p_parmnm2       ;Selector of String
  534.  
  535. vp_tt_lvbsel    equ     vp_offset       ;LVB selector ;D198
  536. vp_tt_offset    equ     vp_selector     ;Offset of string ;D198
  537. vp_tt_selector  equ     vp_parm1        ;Selector of string ;D198
  538. vp_tt_length    equ     vp_parm2        ;Length of string ;D198
  539. vp_tt_handle    equ     vp_parm3        ;Printer handle ;D198
  540.  
  541. vp_f_ansi       equ     0004h           ;ANSI active ;D198
  542. vp_f_ctrlprtsc  equ     0008h           ;Ctrl-PrtSc active ;D198
  543.  
  544. ;Equates for the BvsWrtCharStrAtt routine
  545.  
  546. wa_attroff      equ     p_parmn         ;Offset of Attribute
  547. wa_attrsel      equ     p_parmnm1       ;Selector of Attribute
  548. wa_col          equ     p_parmnm2       ;Starting column
  549. wa_row          equ     p_parmnm3       ;Starting row
  550. wa_length       equ     p_parmnm4       ;Number of bytes to write
  551. wa_stroff       equ     p_parmnm5       ;Offset of Item
  552. wa_strsel       equ     p_parmnm6       ;Selector of Item
  553.  
  554. ;Equates for other BvsWrt* routines
  555.  
  556. w_col           equ     p_parmn         ;Starting column
  557. w_row           equ     p_parmnm1       ;Starting row
  558. w_times         equ     p_parmnm2       ;Number of times to write
  559. w_length        equ     p_parmnm2       ;Number of bytes to write
  560. w_stroff        equ     p_parmnm3       ;Offset of Item
  561. w_strsel        equ     p_parmnm4       ;Selector of Item
  562.  
  563. ;Equates for Extended VIO Calls
  564.  
  565. vp_ev_selector  equ     vp_offset       ;Selector of Global data segment
  566. vp_ev_session   equ     vp_selector     ;Session number
  567.  
  568. ;Structure passed to BvsCreateCA
  569.  
  570. CAB             STRUC
  571. cab_length      dw      size CAB
  572. cab_Srow        dw      ?               ; starting row
  573. cab_Scol        dw      ?               ; starting col
  574. cab_rows        dw      ?               ; number of rows
  575. cab_cols        dw      ?               ; number of cols
  576. cab_option      dw      ?               ; options
  577. cab_formatID    db      ?               ; attribute formatId
  578. cab_attrcount   db      ?               ; attribute count
  579. CAB             ENDS
  580.  
  581. CABMIN          equ     10              ; minmum size of a CA Block
  582. CABOPTION       equ     12              ; minmum size of a CA Block with options
  583. CABFORMAT       equ     13              ; minmum size of a CA Block with format ID
  584. CABATTRCOUNT    equ     14              ; minmum size of a CA Block with attr count
  585. CABMAX          equ     size CAB        ; maximum size of a CA Block
  586.  
  587. ;Equates for BvsCreateCA
  588.  
  589. x_CABoff        equ     p_parmn         ; Offset of CA Block
  590. x_CABsel        equ     p_parmnm1       ; Selector of CA Block
  591. x_hCAoff        equ     p_parmnm2       ; Offset of CA Handle
  592. x_hCAsel        equ     p_parmnm3       ; Selector of CA Handle
  593.  
  594. ;Equates for BvsGetCAState
  595.  
  596. x_gfCAoff       equ     p_parmn         ; offset to CA flags storage area
  597. x_gfCAseg       equ     p_parmnm1       ; segment to CA flags storage area
  598. x_ghCA          equ     p_parmnm2       ; Handle to the CA to be gotten
  599.  
  600. ;Equates for BvsSetCAState
  601.  
  602. x_sfCA          equ     p_parmn         ; Flags to set in the CA
  603. x_shCA          equ     p_parmnm1       ; Handle to the CA to be set
  604.  
  605. ;Equate for BvsDestroyCA
  606.  
  607. x_dhCA          equ     p_parmn         ; Handle to the CA to be destroyed
  608.  
  609. ;@C50 Mou_Open        equ     17      ; ordinal number for MOUCALLS.MOUOPEN   ;@T25
  610. ;@C50 Mou_Close       equ     9       ; ordinal number for MOUCALLS.MOUCLOSE  ;@T25
  611. ;@C50 Ansi_Interp     equ     3       ; ordinal number for ANSICALL.ANSITERP  ;@T25
  612.  
  613. ;@C50 tnk     struc                                                           ;@T25
  614. ;@C50 pfnCall  dd     ?               ; pointer to function to call           ;@T25
  615. ;@C50 pfnTnk   dw     ?               ; offset to thunk routine               ;@T25
  616. ;@C50 szModOff dw     ?               ; offset to module name                 ;@T25
  617. ;@C50 hOrdinal dw     ?               ; ordinal number of the entry point     ;@T25
  618. ;@C50 tnk     ends                                                            ;@T25
  619.  
  620. ;@C50 THUNKDEF    macro   rtn, szMod, hOrd                                    ;@T25
  621. ;@C50 tnk&rtn tnk <ThunkerFarRet, Thunker, szMod, hOrd>                       ;@T25
  622. ;@C50         public  tnk&rtn                                                 ;@T25
  623. ;@C50 endm                                                                    ;@T25
  624.  
  625. ;@C50 THUNKCALL   macro   thunkname                                           ;@T25
  626. ;@C50         mov     [bp].vp_parm20,ds                                       ;@T29
  627. ;@C50         push    BVSISEG                                                 ;@T29
  628. ;@C50         pop     ds                                                      ;@T29
  629. ;@C50         mov     ax,offset tnk&thunkname                                 ;@T25
  630. ;@C50         call    ds:tnk&thunkname.pfnTnk                                 ;@T25
  631. ;@C50         call    ds:tnk&thunkname.pfnCall                                ;@T25
  632. ;@C50         mov     ds,[bp].vp_parm20                                       ;@T25
  633. ;@C50 endm                                                                    ;@T29
  634.  
  635. ;@@A = 01/13/89 STJ, Equates for adapter and display types added, P2986
  636. ;D184 = 03/13/89 STJ, Equates for additional display types
  637. ;D261 = 03/29/89 STJ, Use CONFIG.SYS instead of OS2.INI and optimize
  638. ;@T25 = 04/04/89 TPL, Sizzle work, B701685
  639. ;D198 = 04/13/89 STJ, Install BvsPrtSc and BvsWrtTTY as VDH default routines
  640. ;@T29 = 05/01/89 TPL, B701685 fix; see @T25, B702128
  641. ;@BB7 = 05/09/89 WKB, Restructure config data structure, B702184
  642. ;@C32 = 08/16/89 CJJ, Add video page parm, B706548
  643. ;@D549 = 11/02/89 CJJ, Seltable changes due to rangeless sessions, DCR 549
  644. ;D811 = 2.0 UNIQUE - 11/30/89 MS,  DCR 811
  645. ;@T72 = 07/23/90 TPL, DCR 1295 - Support recognition of XGA device
  646. ;@T72f= 10/02/90 TPL, DCR 1295 fix - use emulated adapter type bit 9, B716888
  647. ;@C39 = 01/15/91 CJJ, MVDM transparent popup changes, PTR SM84577
  648. ;@C50 = 08/01/91 CJJ, B724984 Don't use thunk calls anymore.
  649.