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.

208 lines
6.9 KiB

  1. ;----------------------------Module-Header------------------------------;
  2. ; Module Name: GENCONST.BLT
  3. ;
  4. ; Constants for general use in BitBLT.
  5. ;
  6. ; Created: In Windows' distant past (c. 1983)
  7. ;
  8. ; Copyright (c) 1983 - 1987 Microsoft Corporation
  9. ;
  10. ; This file is a catchall for constants for use in BitBLT.
  11. ;
  12. ; This file is part of a set that makes up the Windows BitBLT function
  13. ; at driver-level.
  14. ;-----------------------------------------------------------------------;
  15. ; The following equates are for stuffing into the generated BLT.
  16. ; For full 16-bit values, the two bytes are reversed so that they
  17. ; come out correctly when stored in memory (i.e. the 8088 stores
  18. ; the LSB first).
  19. I_ADD_AL_BYTE_I equ 004h ;ADD al,byte immediate
  20. I_ADD_AX_WORD_I equ 005h ;ADD ax,word immediate
  21. I_ADD_DI_WORD_I equ 0C781h ;ADD di,immediate
  22. I_ADD_SI_WORD_I equ 0C681h ;ADD si,immediate
  23. I_AND_AL_MEM equ 00622h ;AND al,[addr]
  24. I_AND_AL_BYTE_I equ 024h ;AND al,byte immediate
  25. I_CMP_AL_BYTE_I equ 03Ch ;CMP al,byte immediate
  26. I_CMP_AX_WORD_I equ 03Dh ;CMP ax,word immediate
  27. I_CMP_CX_2 equ 0F983h ;CMP cx,2
  28. I_CS_OVERRIDE equ 02Eh ;CS:
  29. I_DEC_SI_DEC_DI equ 04F4Eh ;DEC si
  30. ;DEC di
  31. I_ES_OVERRIDE equ 026h ;ES:
  32. I_FS_OVERRIDE equ 064h ;FS:
  33. I_GS_OVERRIDE equ 065h ;GS:
  34. I_INC_SI_INC_DI equ 04746h ;INC si
  35. ;INC di
  36. I_JC_P5H equ 00372h ;JC $+5
  37. I_JC_P0DH equ 00B72h ;JC $+0Dh
  38. I_JC_P12H equ 01072h ;JC $+12h
  39. I_JMP_NEAR equ 0E9h ;JMP near
  40. I_JNC equ 073h ;JNC short
  41. I_JNC_P12H equ 01073h ;JNC $+12h
  42. I_JNS_P6 equ 00479H ;JNS $+6
  43. I_JLE_P2 equ 0007EH ;JLE $+2 mslin
  44. I_LEA_AX_SI_DISP16 equ 0848Dh ;lea ax,WordDisp[si]
  45. I_LEA_AX_DI_DISP16 equ 0858Dh ;lea ax,WordDisp[di]
  46. I_LODSB equ 0ACh ;LODSB
  47. I_LOOP equ 0E2h ;LOOP
  48. I_MOV_AH_AL equ 0E08Ah ;MOV ah,al
  49. I_MOV_AH_DEST equ 0258Ah ;MOV ah,[di]
  50. I_MOV_AH_SI_DISP16 equ 0A48Ah ;MOV ah,WordDisp[si]
  51. I_MOV_AL_0FFH equ 0FFB0h ;MOV al,0FFH
  52. I_MOV_AL_AH equ 0C48Ah ;MOV al,ah
  53. I_MOV_AL_DL equ 0C28Ah ;MOV al,dl
  54. I_MOV_AL_DH equ 0C68Ah ;MOV al,dh
  55. I_MOV_AL_DEST equ 0058Ah ;MOV al,[di]
  56. I_MOV_AL_MEM equ 0A0h ;MOV al,[addr]
  57. I_MOV_AL_SI_DISP16 equ 0848Ah ;MOV al,WordDisp[si]
  58. I_MOV_AX_DS equ 0D88Ch ;MOV ax,ds
  59. I_MOV_AX_DI equ 0C78Bh ;MOV ax,di
  60. I_MOV_AX_ES equ 0C08Ch ;MOV ax,es
  61. I_MOV_AX_SI equ 0C68Bh ;MOV ax,si
  62. I_MOV_AX_WORD_I equ 0B8h ;MOV ax,immediate
  63. I_MOV_BL_AL equ 0D88Ah ;MOV bl,al
  64. I_MOV_AL_BYTE_I equ 0B0h ;MOV al,immediate mslin
  65. I_MOV_BL_BYTE_I equ 0B3h ;MOV bl,immediate
  66. I_MOV_BP_WORD_I equ 0BDh ;MOV bp,immediate
  67. I_MOV_BX_WORD_I equ 0BBh ;MOV bx,word immediate
  68. I_MOV_CX_DS equ 0D98Ch ;MOV cx,ds
  69. I_MOV_CX_WORD_I equ 0B9h ;MOV cx,immediate
  70. I_MOV_DH_BX_DISP8 equ 0778Ah ;MOV dh,ByteDisp[si]
  71. I_MOV_DI_AX equ 0F88Bh ;MOV di,ax
  72. I_MOV_DL_AL equ 0D08Ah ;MOV dl,al
  73. I_MOV_DS_AX equ 0D88Eh ;MOV ds,ax
  74. I_MOV_DS_CX equ 0D98Eh ;MOV ds,cx
  75. I_MOV_ES_AX equ 0C08Eh ;MOV es,ax
  76. I_MOV_MEM_AL equ 0A2h ;MOV [addr],al
  77. I_MOV_SI_AX equ 0F08Bh ;MOV si,ax
  78. I_MOVSB equ 0A4h ;MOVSB
  79. I_MOVSW equ 0A5h ;MOVSW
  80. I_MOV_MEM_AX equ 0A2h ;MOV [addr],ax ;mslin
  81. I_MOV_BL_BYTE_I equ 0B3h ;MOV bl, byte immediate
  82. I_NOT_AL equ 0D0F6h ;NOT al
  83. I_NOT_AX equ 0D0F7h ;NOT ax
  84. I_OR_AL_AH equ 0C40Ah ;OR al,ah
  85. I_OR_AH_AL equ 0E00Ah ;OR ah,al
  86. I_POP_BX equ 05Bh ;POP bx
  87. I_POP_SI equ 05Eh ;POP si
  88. I_POP_DI_POP_CX equ 0595Fh ;POP di
  89. ;POP cx
  90. I_PUSH_BX equ 053h ;PUSH bx
  91. I_PUSH_SI equ 056h ;PUSH si
  92. I_PUSH_CX_PUSH_DI equ 05751h ;PUSH cx
  93. ;PUSH di
  94. I_REP equ 0F3h ;REP
  95. I_RET_NEAR equ 0C3h ;RET near
  96. I_RET_FAR equ 0CBh ;RET far
  97. I_ROL_AL_1 equ 0C0D0h ;ROL al,1
  98. I_ROR_AL_1 equ 0C8D0h ;ROR al,1
  99. I_ROL_AL_N equ 0C0C0h ;ROL al,N -- next byte is N
  100. I_ROR_AL_N equ 0C8C0h ;ROR al,N -- next byte is N
  101. I_SHL_BL_1 equ 0E3D0h ;SHL bl,1
  102. I_SS_OVERRIDE equ 036h ;SS:
  103. I_STOSB equ 0AAh ;STOSB
  104. I_STOSW equ 0ABh ;STOSW
  105. I_XOR_AL_MEM equ 00632h ;XOR al,[addr]
  106. I_XOR_AL_BYTE_I equ 034h ;XOR al,byte immediate
  107. I_XOR_AX_WORD_I equ 035h ;XOR ax,word immediate
  108. I_XOR_BH_BH equ 0FF32h ;XOR BH,BH
  109. I_XOR_MEM_WORD_I equ 03681H ;XOR [addr],word immediate
  110. ;mslin added
  111. I_MOV_DX_WORD_I equ 0BAh ;MOV dx,immediate
  112. I_POP_DX equ 05Ah ;POP dx
  113. I_MOV_DX_DS equ 0DA8Ch ;MOV dx,ds
  114. I_MOV_AL_000H equ 000B0h ;MOV al,000H
  115. page
  116. ; INCREASE is the flag used to show that the BLT operation will be
  117. ; increasing in Y (Y+).
  118. ;
  119. ; DECREASE is the flag used to show that the BLT operation will be
  120. ; decreasing in Y (Y-).
  121. ;
  122. ; STEPLEFT is the flag used to show that the BLT will be stepping
  123. ; left (i.e. start at the right hand corner of the source, stepping
  124. ; left, or X-).
  125. ;
  126. ; STEPRIGHT is the flag used to show that the BLT will be stepping
  127. ; right (i.e. start at the left hand corner of the source, stepping
  128. ; right, or X+).
  129. INCREASE equ 1 ;Incrementing
  130. DECREASE equ -1 ;Decrementing
  131. STEPLEFT equ 0 ;Stepping to the left
  132. STEPRIGHT equ 1 ;Stepping to the right
  133. page
  134. ; gl_the_flags
  135. ;
  136. ; F0_GAG_CHOKE Set if the source and destination are of different
  137. ; color formats. When set, some form of color
  138. ; conversion will be required.
  139. ;
  140. ; Once you see what all is involved with color
  141. ; conversion, you'll understand why this flag is
  142. ; called this.
  143. ;
  144. ; F0_COLOR_PAT Set if color pattern fetch code will be used. If
  145. ; clear, then mono pattern fetch code will be used.
  146. ; Mono/color pattern fetch is always based on the
  147. ; destination being mono/color (it is the same).
  148. ;
  149. ; F0_PAT_PRESENT Set if a pattern is involved in the BLT.
  150. ;
  151. ; F0_SRC_PRESENT Set if a source is involved in the BLT.
  152. ;
  153. ; F0_SRC_IS_DEV Set if the source is the physical device. Clear if
  154. ; the source is a memory bitmap.
  155. ;
  156. ; F0_SRC_IS_COLOR Set if the source is color, clear if monochrome.
  157. ;
  158. ; F0_DEST_IS_DEV Set if the destination is the physical device.
  159. ; Clear if the destination is a memory bitmap.
  160. ;
  161. ; F0_DEST_IS_COLOR
  162. ; Set if the destination is color, clear if
  163. ; monochrome.
  164. F0_GAG_CHOKE equ 10000000b ;Going mono <==> color
  165. F0_COLOR_PAT equ 01000000b ;Use color pattern fetch code
  166. F0_PAT_PRESENT equ 00100000b ;Pattern is involved in blt
  167. F0_SRC_PRESENT equ 00010000b ;Source is involved in blt
  168. F0_SRC_IS_DEV equ 00001000b ;Source is the device
  169. F0_SRC_IS_COLOR equ 00000100b ;Source is color
  170. F0_DEST_IS_DEV equ 00000010b ;Destination is the device
  171. F0_DEST_IS_COLOR equ 00000001b ;Destination is color
  172. ;-----------------------------------------------------------------------;
  173. ; Definitions for fbFetch
  174. ;-----------------------------------------------------------------------;
  175. FF_NO_LAST_FETCH equ 00000010b ;Final fetch might GP
  176. FF_TWO_INIT_FETCHES equ 00000001b ;Two initial fetches needed
  177. FF_ONE_INIT_FETCH equ 0 ;One initial fetche needed
  178. FF_ONLY_1_DEST_BYTE equ 00000100b ;Only one destination byte
  179. FF_ONLY_1_SRC_BYTE equ 00001000b ;Only one source byte
  180. ;-----------------------------------------------------------------------;