home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v2.zip / DDKX86 / DBCSDD / SRC_DBCS / VDHV / VDHEQU.INC < prev    next >
Text File  |  1995-04-14  |  14KB  |  290 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. ;/*****************************************************************************
  13. ;*
  14. ;* SOURCE FILE NAME = VDHEQU.INC
  15. ;*
  16. ;* DESCRIPTIVE NAME = Macros, definitions for base video
  17. ;*
  18. ;*
  19. ;* VERSION      V2.0
  20. ;*
  21. ;* DATE
  22. ;*
  23. ;* DESCRIPTION  Macros, definitions for base video
  24. ;*
  25. ;* FUNCTIONS    NONE
  26. ;*
  27. ;* NOTES        NONE
  28. ;*
  29. ;* STRUCTURES   NONE
  30. ;*
  31. ;* EXTERNAL REFERENCES
  32. ;*
  33. ;*              NONE
  34. ;*
  35. ;* EXTERNAL FUNCTIONS
  36. ;*
  37. ;*              NONE
  38. ;*
  39. ;* CHANGE ACTIVITY =
  40. ;*   DATE      FLAG        APAR   CHANGE DESCRIPTION
  41. ;*   --------  ----------  -----  --------------------------------------
  42. ;*   mm/dd/yy  @Vr.mpppxx  xxxxx   xxxxxxx
  43. ;*   03/25/89              132     DCR 132 changes
  44. ;*   04/11/91              1348    NAKADA, Enable DBCS support in Vio-Window, DCR 1348
  45. ;*   09/25/91              B726706 WKB, OEM changes
  46. ;*   06/21/89  J-KKJ               KKJ, Norikae
  47. ;*   09/21/89  j-ys921             YS, Real Mode Support
  48. ;*   09/25/89  J-KK0925            KKJ, ROM Font -> RAM Font
  49. ;*   10/05/89  J-KK1005            KKJ, env_option
  50. ;*   10/12/89  J-KK1012            KKJ, Move STRUC into VDHSTRUC.INC
  51. ;*   10/16/89  J-KK1016            KKJ, Add EQU for Xvio Interface
  52. ;*   10/17/89  J-KK1017            KKJ, Add CLEARED_LVB EQU in Sub_Option and DBCSEvBuffSize.
  53. ;*   10/19/89  J-KK1019            KKJ,     CLEARED_LVB (3->4)
  54. ;*   10/20/89  j-ys1020,1027            for MS-Xvio support.
  55. ;*   10/26/89  J-KK1026            KKJ, Add CA_Request
  56. ;*   12/14/89  J-KK1214            KKJ, Add MemMap_GraphC2 for 1040x768
  57. ;*   01/10/90  J-KK0110            KKJ, Add Real_Mode flag in a Sub_Option field.
  58. ;*   01/25/90  J-KK0125            KKJ, Change Font Attribute for Install.
  59. ;*   02/06/90  J-KK0206            KKJ, Add ALL_REDRAWN bit in Sub_Option.
  60. ;*   02/20/90  J-KKB12             KKJ, Add Read_Ope bit.
  61. ;*   06/22/90  @KK0622             KKJ, Must not call DOSGETSEG at HardError. Fix AS/400 Problem.
  62. ;*                                      Add SPE_REDRAW equ. to request a special request.
  63. ;*
  64. ;*****************************************************************************/
  65.  
  66.         include vdhctl.inc              ; Conditional assembly control J-KK1002
  67.  
  68. ;STJFMT,,16
  69.  
  70. ;;-----------------------------------------
  71. ;; Max Slot Number
  72. maxslot         equ     8
  73. ;;-----------------------------------------
  74.  
  75. ENVFLAG_3xBOX   equ     0001h           ;j-ys921
  76.  
  77. DBCSEvBuffSize  equ     10              ;J-KK1017
  78.  
  79. FUNC_NUM        EQU     256             ; BufferUpdate function number
  80. GRAPHICS_MODE   EQU     0000000000000010b ; Mode type bit 1
  81. PVB_SEL_BIT     EQU     0000000000000001b ; PVB flag bit
  82. LVB_SEL_BIT     EQU     0000000000000010b ; LVB flag bit
  83. CGAAttr         EQU     0000000000000100b ; passed attrs are CGA format ;@P1
  84. RESERVED_FLAGS  EQU     1111111111111000b
  85. I_ReadCellTypes equ     0               ; table for EGA format LVB      ;@P1
  86. I_ReadCharStr   equ     1               ; Read characters               ;@P1
  87. I_ReadCellStr   equ     2               ; Read character/attribute 's   ;@P1
  88. I_ScrollUp      equ     3               ; Scroll window up              ;@P1
  89. I_ScrollDown    equ     4               ; Scroll window down            ;@P1
  90. I_ScrollLeft    equ     5               ; Scroll window left            ;@P1
  91. I_ScrollRight   equ     6               ; Scroll window right           ;@P1
  92. I_WrtCellStr    equ     7               ; Write character/attribute 's  ;@P1
  93. I_WrtCharStr    equ     8               ; Write characters              ;@P1
  94. I_WrtCharStrAt  equ     9               ; Write characters with attr    ;@P1
  95. I_WrtNChar      equ     0ah             ; Write character N times       ;@P1
  96. I_WrtNAttr      equ     0bh             ; Write attribute N times       ;@P1
  97. I_WrtNCell      equ     0ch             ; Write cell N times            ;@P1
  98. I_LVBToPVB      equ     0dh             ; Copy the LVB to the PVB       ;@P1
  99. MIN_WRT_INDEX   EQU     7               ;@P1
  100. MAX_INDEX       EQU     13              ; Max index value allowed       ;@P1
  101. STATUS_PORT     EQU     3DAH            ; Video port for retrace status
  102.  
  103. WorldAttrCount  equ     3               ;@P1
  104. WorldFMTATTR    equ     0370h           ;@P1
  105. WorldCellSize   equ     4               ;@P1
  106. DefaultCellSize equ     2               ;@P1
  107. LEFT            equ     0001h           ;@P1
  108. UP              equ     0002h           ;@P1
  109. RIGHT           equ     0004h           ;@P1
  110. DOWN            equ     0008h           ;@P1
  111. LVBPVB          equ     0010h           ;@P1
  112. DOMOVE          equ     0001h           ;@P1
  113. DOFILL          equ     0002h           ;@P1
  114.  
  115. ;;======================================= Following are Japanese Unique code.
  116. ATLAS3AttrCount equ     3               ; ATLAS 3 byte format
  117. ATLAS3FMTATTR   equ     0300h           ; 
  118. ATLAS3CellSize  equ     4               ; 
  119. ;;------------------------------------------------------------------------
  120. ;; Japanese Video Mode Index Number
  121. ;;      This value must be set into env_jformat at setting Video Mode.
  122. ;;      This value relates to a function index in XGAWRITE/XGASCROL.
  123. ;;------------------------------------------------------------------------
  124. EPOCH_Format    equ     0               ; Epoch Format
  125. COMMON_Format   equ     2               ; Common Format
  126. ATLAS3_Format   equ     COMMON_Format+2 ; Atlas 3 byte Attribute Format
  127. ATLASUS_Format  equ     COMMON_Format+4 ; U.S. Emualtion Format
  128.  
  129. ATTR_INFORM     EQU     00000100b       ; ATTRIBUTE Information bit ;J-KKJ
  130.  
  131. ;;------------- Japan Unique EQU ---------------------------------------
  132. dbcsE1          equ     01              ;DBCS flag      for Epoch Format
  133. dbcsE2          equ     02              ;DBCS 2nd flag  for Epoch Format
  134. dbcsA1          equ     01              ;DBCS flag      for Atlas Format
  135. dbcsA1H         equ     0100h           ;DBCS flag      for Atlas Format
  136. dbcsA2          equ     80h             ;DBCS 2nd flag  for Atlas Format
  137. dbcsA2H         equ     8000h           ;DBCS 2nd flag  for Atlas Format
  138. TOEXT           equ     1000h           ;Extra Attribute Offset for Atlas Format
  139. ATLAS_BLINK     equ     80h             ;Blink/H-Int bit in Attr0 for Atlas Format
  140.  
  141.  
  142. ;;╔═══════════════════════════════════════════════════════════════════════════╗
  143. ;;║ Must be identical with ones in VDH.H !!!!!                                ║
  144. ;;║ [bp].Sub_Option                                                           ║
  145. ;;╚═══════════════════════════════════════════════════════════════════════════╝
  146. ;; Following Global Bit
  147. BLINK_STATE     equ     1               ;MSB in Attr0 means Blinking not H-Int for Atlas Format
  148.                                         ;This bit is affected to "env_attr_state".
  149. ALWAYS_FNTCALL  equ     2               ; Always Call Font SubSystem  J-KK1005
  150. ALL_REDRAWN     equ     4               ; All screen is redrawn by Xvio.J-KK0206
  151. SPE_REDRAWN     equ     8               ; Special Redraw Req. to Xvio.  @KK0622
  152.  
  153. ;;----------------------------------------------------------------------------
  154. ;; Following Local Bit
  155. CLEARED_LVB     equ     100h            ; LVB has been cleared.       J-KK1019
  156. CA_Request      equ     200h            ; Request From MS-XVIO        J-KK1026
  157. LVB_Changed     equ     400h            ; LVB Selector Changed        J-KK1026
  158. f_restfromlvb   equ    0800h            ; restore form LVB ( XvioM )  ;j-ys111
  159. f_end_adjust    equ    1000h            ; DBCS exception handling ( XVioM );j-ys111
  160. Read_Ope        equ    4000h            ; Read Operation                J-KKB12
  161. Real_Mode       equ    8000h            ; Real Mode Flag                J-KK0110
  162.  
  163.  
  164. ;; Extra Attribute 1 and 2 for Atlas
  165.                 IFDEF   FONT_SUPPORT    ; 
  166. EXTRA_ATTR          equ     1C00h       ; RAM SBCS                    ;;J-KK0925
  167.                 ELSE
  168. ;;J-KK0125 EXTRA_ATTR          equ     0200h       ; Extra SBCS in ROM   <=== Dummy
  169. EXTRA_ATTR      equ     0000h           ; Extra SBCS in ROM             J-KK0125
  170.                 ENDIF
  171.  
  172.  
  173. EXTRA_ATTRHigh  equ     EXTRA_ATTR/ 256 ; RAM SBCS High             ;;J-KK0925
  174. EXTRA_ATTR1     equ     EXTRA_ATTR+dbcsA1H ; DBCS 1st Attr for Extra Attr
  175. EXTRA_ATTR2     equ     EXTRA_ATTR+dbcsA1H+dbcsA2H ; DBCS 2nd Attr for Extra Attr
  176.  
  177. TypeE           equ     EXTRA_ATTRHigh      ;Default Base      Hankaku
  178. TypeF           equ     01EH                ;Default Extention Hankaku
  179.  
  180. SBCS_TYPE_MASK  equ     01Eh                ; SBCS type select bit mask ;J-TS00
  181.  
  182. CHANGE_BIT      equ     4000h               ; displayed char is changed ;J-TS00
  183. CHANGE_BITHigh  equ     CHANGE_BIT/256      ; 
  184. UNDERLINE_BIT   equ     80h                 ; attribute bits of common DBCS
  185. REVERSE_BIT     equ     40h                 ; format attr1
  186. BLINK_BIT       equ     20h                 ; 
  187. TRANS_BIT       equ     10h                 ; 
  188. VERT_BIT        equ     08h                 ; 
  189. HORZ_BIT        equ     04h                 ; 
  190.  
  191. A_BLINK_BIT     equ     80h                 ; attribute bits of ATLAS 3 bytes ;J-TS00
  192. A_UNDERLINE_BIT equ     40h                 ; format attr1              ;J-TS00
  193. A_COLUMN_BIT    equ     20h                 ;                           ;J-TS00
  194. A_TRANS_BIT     equ     08h                 ;                           ;J-TS00
  195. A_RVERT_BIT     equ     04h                 ;                           ;J-TS00
  196. A_HORZ_BIT      equ     02h                 ;                           ;J-TS00
  197. A_VERT_BIT      equ     01h                 ;                           ;J-TS00
  198.  
  199. ;;------------------------------------------------------------------------
  200. ;; Index Number
  201. ;;------------------------------------------------------------------------
  202. RCELLT          equ     0               ;ReadCellTypes
  203. RCHAR           equ     1               ;ReadCharStr
  204. RCELL           equ     2               ;ReadCellStr
  205. SCRUP           equ     3               ;ScrollUp
  206. SCRDN           equ     4               ;ScrollDown
  207. SCRL            equ     5               ;ScrollLeft
  208. SCRR            equ     6               ;ScrollRight
  209. WCELL           equ     7               ;WriteCellStr
  210. WCHAR           equ     8               ;WriteCharStr
  211. WCHARA          equ     9               ;WriteCharStrAttr
  212. WNCHAR          equ     10              ;WriteNChar
  213. WNATTR          equ     11              ;WriteNAttr
  214. WNCELL          equ     12              ;WriteNCell
  215. CLVBToPVB       equ     13              ;Copy the LVB to the PVB
  216. ;;----------------------------------------------------------------------
  217.  
  218. ls              equ     0e0h            ;sequencer
  219. lf              equ     0e2h            ;font mover
  220. lc              equ     0e4h            ;crtc
  221. lv              equ     0e8h            ;video attr
  222. lg              equ     0eah            ;graphics
  223.  
  224. ;;----------------------------------------------------------------------
  225. ;; Memory Map Order Number
  226. ;;----------------------------------------------------------------------
  227. MemMap_ATLAS80  equ     0
  228. MemMap_ATLAS82  equ     1
  229. MemMap_EPOCH80  equ     2
  230. MemMap_EPOCH82  equ     3
  231. MemMap_GraphM   equ     4
  232. MemMap_GraphC   equ     5               ; 1024x768
  233. MemMap_GraphC2  equ     6               ;Add 1040x768                   J-KK1214
  234.  
  235. MemMap_VGAGraphM equ    7
  236. MemMap_VGAGraphC equ    8
  237.  
  238. ;;----------------------------------------------------------------------
  239. ;; Order Number to FNTCALLS.
  240. ;;----------------------------------------------------------------------
  241. Font_EPOCHT     equ     0               ; Epoch Text
  242. Font_EPOCHG     equ     1               ; Mono  (Epoch) Graphics
  243. ;;J-KK0925 Font_PHOENIXT           equ  2          ; Phoenix Text (Only Color)
  244. ;;J-KK0925 Font_PHOENIXG           equ  3          ; Color Graphics
  245. Font_ATLAS      equ     2               ; ATLAS Text
  246. Font_ATLASG     equ     3               ; Color (ATLAS) Graphics
  247. Font_VGA        equ     8000h
  248.  
  249.  
  250. ;;----------------------------------------------------------------------
  251. ;; Xvio Interface to Hide and Redraw                            J-KK1016
  252. ;;----------------------------------------------------------------------
  253. Suspend         equ     1               ; Option
  254. Resume          equ     2
  255. NoOption        equ     0
  256. HardErr_Redraw  equ     8          ; Redraw Request at HardError Popup. @KK0622
  257.  
  258. XvsInitialize   equ      0
  259. XvsSuspend      equ      1
  260. XvsResume       equ      2
  261. XvsHide         equ      3
  262. XvsRedraw       equ      4
  263. XvsSetBuf       equ      5
  264. XvsSetMode      equ      6
  265. XvsSetState     equ      7
  266. XvsSetCurPos    equ      8
  267. XvsSetCurType   equ      9
  268. XvsSetTimeout   equ     10
  269. XvsSetCP        equ     11
  270.  
  271. ;;----------------------------------------------------------------------
  272. ;; This Structure must be identical to VIDEOMODE in VDH.H.
  273. ;;----------------------------------------------------------------------
  274. modedata        STRUC                   ;Mode data structure
  275. mode_datalen    dw      14              ;Length of mode data
  276. mode_type       db      ?               ;Type for Mode
  277. mode_colors     db      ?               ;Colors for Mode
  278. mode_cols       dw      ?               ;Number of screen columns for text
  279. mode_rows       dw      ?               ;Number of screen rows for text
  280. mode_gcols      dw      ?               ;Number of screen columns for graphics
  281. mode_grows      dw      ?               ;Number of screen rows for graphics
  282. mode_formatid   db      ?               ;Format ID
  283. mode_attrcount  db      ?               ;Counts of attribute
  284. mem_map         db      ?               ;Memory Map ID
  285. format_index    dw      ?               ;Format Index Number
  286. Font_index      dw      ?               ;Font   Index Number
  287. proc_offset     dw      ?               ;Mode Procedure Offset
  288. Default_data    dw      ?               ;Default Data Index
  289. modedata        ENDS
  290.