Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

120 lines
5.4 KiB

  1. page ,132
  2. ;-----------------------------Module-Header-----------------------------;
  3. ; Module Name: EGAVGA.INC
  4. ;
  5. ; This file contains the external definitions of the EGA/VGA specific
  6. ; locations which driver output routines need to reference.
  7. ;
  8. ; Copyright (c) Microsoft Corporation 1989 - 1993
  9. ;
  10. ;-----------------------------------------------------------------------;
  11. ;-----------------------------------------------------------------------;
  12. ; Miscellaneous Registers used only at EGA/VGA initialization time
  13. MISC_OUTPUT EQU 0C2h ;Miscellaneous Output Register
  14. CRTC_ADDR EQU 0D4h ;CRTC Address Register for color mode
  15. CRTC_DATA EQU 0D5h ;CRTC Data Register for color mode
  16. GRAF_1_POS EQU 0CCh ;Graphics 1 Address Register
  17. GRAF_2_POS EQU 0CAh ;Graphics 2 Address Register
  18. ATTR_READ EQU 0DAh ;Attribute Controler Read Address
  19. ATTR_WRITE EQU 0C0h ;Attribute Controler Write Address
  20. IN_STAT_0 EQU 0C2h ;Input Status Register 0
  21. IN_STAT_1 EQU 0DAh ;Input Status Register 1
  22. ; EGA/VGA Register Definitions.
  23. ;
  24. ; The following definitions are the EGA/VGA registers and values
  25. ; used by this driver. All other registers are set up at
  26. ; when the EGA/VGA is placed into graphics mode and never altered
  27. ; afterwards.
  28. ;
  29. ; All unspecified bits in the following registers must be 0.
  30. EGA_BASE EQU 300h ;Base address of the EGA (3xx)
  31. VGA_BASE EQU 300h ;Base address of the VGA (3xx)
  32. ; EGA/VGA Register Definitions.
  33. EGA_BASE EQU 300h ;Base address of the EGA (3xx)
  34. VGA_BASE EQU 300h ;Base address of the VGA (3xx)
  35. ; SEQUencer Registers Used
  36. SEQ_ADDR EQU 0C4h ;SEQUencer Address Register
  37. SEQ_DATA EQU 0C5h ;SEQUencer Data Register
  38. SEQ_MAP_MASK EQU 02h ;Write Plane Enable Mask
  39. MM_C0 EQU 00000001b ; C0 plane enable
  40. MM_C1 EQU 00000010b ; C1 plane enable
  41. MM_C2 EQU 00000100b ; C2 plane enable
  42. MM_C3 EQU 00001000b ; C3 plane enable
  43. MM_ALL EQU 00001111b ; All planes
  44. SEQ_MODE EQU 04h ;Memory Mode
  45. SM_ALPHA EQU 00000001b ; Char map select enable
  46. SM_EXTENDED EQU 00000010b ; Extended memory present
  47. SM_ODD_PLANE EQU 00000100b ; Odd/even bytes to same plane
  48. SM_CHAIN4 EQU 00001000b ; Chain4 mode
  49. ; Graphics Controller Registers Used
  50. GRAF_ADDR EQU 0CEh ;Graphics Controller Address Register
  51. GRAF_DATA EQU 0CFh ;Graphics Controller Data Register
  52. GRAF_SET_RESET EQU 00h ; Set/Reset Plane Color
  53. GRAF_ENAB_SR EQU 01h ; Set/Reset Enable
  54. GRAF_COL_COMP EQU 02h ; Color Compare Register
  55. GRAF_DATA_ROT EQU 03h ; Data Rotate Register
  56. DR_ROT_CNT EQU 00000111b ; Data Rotate Count
  57. DR_SET EQU 00000000b ; Data Unmodified
  58. DR_AND EQU 00001000b ; Data ANDed with latches
  59. DR_OR EQU 00010000b ; Data ORed with latches
  60. DR_XOR EQU 00011000b ; Data XORed with latches
  61. GRAF_READ_MAP EQU 04h ; Read Map Select Register
  62. RM_C0 EQU 00000000b ; Read C0 plane
  63. RM_C1 EQU 00000001b ; Read C1 plane
  64. RM_C2 EQU 00000010b ; Read C2 plane
  65. RM_C3 EQU 00000011b ; Read C3 plane
  66. GRAF_MODE EQU 05h ; Mode Register
  67. M_PROC_WRITE EQU 00000000b ; Write processor data rotated
  68. M_LATCH_WRITE EQU 00000001b ; Write latched data
  69. M_COLOR_WRITE EQU 00000010b ; Write processor data as color
  70. M_AND_WRITE EQU 00000011b ; Write (procdata AND bitmask)
  71. M_DATA_READ EQU 00000000b ; Read selected plane
  72. M_COLOR_READ EQU 00001000b ; Read color compare
  73. GRAF_MISC EQU 06h ; Miscellaneous Register
  74. MS_NON_ALPHA EQU 00000001b ; Char generator disabled
  75. MS_ODD_EVEN EQU 00000010b ; Map odd addresses to even
  76. MS_A0000_128K EQU 00000000b ; Memory present at A0000, 128kb
  77. MS_A0000_64K EQU 00000100b ; Memory present at A0000, 64kb
  78. MS_B0000_32K EQU 00001000b ; Memory present at B0000, 32kb
  79. MS_B8000_32K EQU 00001100b ; Memory present at B8000, 32kb
  80. MS_ADDR_MASK EQU 00001100b
  81. GRAF_CDC EQU 07h ; Color Don't Care Register
  82. GRAF_BIT_MASK EQU 08h ; Bit Mask Register
  83. ; Various sizes for EGA/VGA data structures
  84. ;-----------------------------------------------------------------------;
  85. ; The pointer parameters are the size of the pointer as received from
  86. ; DeviceSetCursor.
  87. ;-----------------------------------------------------------------------;
  88. PTR_HEIGHT EQU 32
  89. PTR_WIDTH EQU 4 ;Width in bytes of pointer
  90. PTR_WIDTH_BITS EQU PTR_WIDTH*8 ;Width in bits of pointer