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.

146 lines
4.6 KiB

  1. page ,132
  2. ;----------------------------Module-Header------------------------------;
  3. ; Module Name: SETDI32.ASM
  4. ;
  5. ; move bits from one DIB format into another. doing color conversion if
  6. ; needed.
  7. ;
  8. ; convert_8_32
  9. ; convert_16_32
  10. ; convert_24_32
  11. ; convert_32_32
  12. ;
  13. ; NOTES:
  14. ;
  15. ; AUTHOR: ToddLa (Todd Laney) Microsoft
  16. ;
  17. ;-----------------------------------------------------------------------;
  18. ?PLM=1
  19. ?WIN=0
  20. .xlist
  21. include cmacro32.inc
  22. include windows.inc
  23. .list
  24. sBegin Data
  25. sEnd Data
  26. ifndef SEGNAME
  27. SEGNAME equ <_TEXT32>
  28. endif
  29. .386
  30. createSeg %SEGNAME, CodeSeg, word, public, CODE
  31. sBegin CodeSeg
  32. assumes cs,CodeSeg
  33. assumes ds,nothing
  34. assumes es,nothing
  35. ;--------------------------------------------------------------------------;
  36. ;--------------------------------------------------------------------------;
  37. nxtscan macro reg, next_scan, fill_bytes
  38. ifb <fill_bytes>
  39. add e&reg,next_scan
  40. else
  41. mov eax,e&reg
  42. add e&reg,next_scan
  43. cmp ax,reg
  44. sbb eax,eax
  45. and eax,fill_bytes
  46. add e&reg,eax
  47. endif
  48. endm
  49. ;--------------------------------------------------------------------------;
  50. ;
  51. ; convert_8_32
  52. ;
  53. ;--------------------------------------------------------------------------;
  54. assumes ds,nothing
  55. assumes es,nothing
  56. cProc convert_8_32,<FAR,PUBLIC,PASCAL>,<esi,edi,ds>
  57. ParmD dst_ptr ; --> dst.
  58. ParmD dst_offset ; offset to start at
  59. ParmD dst_next_scan ; dst_next_scan.
  60. ParmD dst_fill_bytes ; dst_fill_bytes
  61. ParmD src_ptr ; --> src.
  62. ParmD src_offset ; offset to start at
  63. ParmD src_next_scan ; dst_next_scan.
  64. ParmD pel_count ; pixel count.
  65. ParmD scan_count ; scan count.
  66. ParmD xlat_table ; pixel convert table.
  67. cBegin
  68. cEnd
  69. ;--------------------------------------------------------------------------;
  70. ;
  71. ; convert_16_32
  72. ;
  73. ;--------------------------------------------------------------------------;
  74. assumes ds,nothing
  75. assumes es,nothing
  76. cProc convert_16_32,<FAR,PUBLIC,PASCAL>,<esi,edi,ds>
  77. ParmD dst_ptr ; --> dst.
  78. ParmD dst_offset ; offset to start at
  79. ParmD dst_next_scan ; dst_next_scan.
  80. ParmD dst_fill_bytes ; dst_fill_bytes
  81. ParmD src_ptr ; --> src.
  82. ParmD src_offset ; offset to start at
  83. ParmD src_next_scan ; dst_next_scan.
  84. ParmD pel_count ; pixel count.
  85. ParmD scan_count ; scan count.
  86. ParmD xlat_table ; pixel convert table.
  87. cBegin
  88. cEnd
  89. ;--------------------------------------------------------------------------;
  90. ;
  91. ; convert_24_32
  92. ;
  93. ;--------------------------------------------------------------------------;
  94. assumes ds,nothing
  95. assumes es,nothing
  96. cProc convert_24_32,<FAR,PUBLIC,PASCAL>,<esi,edi,ds>
  97. ParmD dst_ptr ; --> dst.
  98. ParmD dst_offset ; offset to start at
  99. ParmD dst_next_scan ; dst_next_scan.
  100. ParmD dst_fill_bytes ; dst_fill_bytes
  101. ParmD src_ptr ; --> src.
  102. ParmD src_offset ; offset to start at
  103. ParmD src_next_scan ; dst_next_scan.
  104. ParmD pel_count ; pixel count.
  105. ParmD scan_count ; scan count.
  106. ParmD xlat_table ; pixel convert table.
  107. cBegin
  108. cEnd
  109. ;--------------------------------------------------------------------------;
  110. ;
  111. ; convert_32_32
  112. ;
  113. ;--------------------------------------------------------------------------;
  114. assumes ds,nothing
  115. assumes es,nothing
  116. cProc convert_32_32,<FAR,PUBLIC,PASCAL>,<esi,edi,ds>
  117. ParmD dst_ptr ; --> dst.
  118. ParmD dst_offset ; offset to start at
  119. ParmD dst_next_scan ; dst_next_scan.
  120. ParmD dst_fill_bytes ; dst_fill_bytes
  121. ParmD src_ptr ; --> src.
  122. ParmD src_offset ; offset to start at
  123. ParmD src_next_scan ; dst_next_scan.
  124. ParmD pel_count ; pixel count.
  125. ParmD scan_count ; scan count.
  126. ParmD xlat_table ; pixel convert table.
  127. cBegin
  128. cEnd
  129. sEnd CodeSeg
  130. end