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.

100 lines
1.9 KiB

  1. title "Display Adapter type detection"
  2. ;++
  3. ;
  4. ; Copyright (c) 1989 Microsoft Corporation
  5. ;
  6. ; Module Name:
  7. ;
  8. ; video.asm
  9. ;
  10. ; Abstract:
  11. ;
  12. ; This module implements the assembley code necessary to determine
  13. ; various display chip sets.
  14. ;
  15. ; Author:
  16. ;
  17. ; Shie-Lin Tzong (shielint) 04-Dec-1991.
  18. ; Most of the code is taken from Win31 vdd and setup code(with modification.)
  19. ;
  20. ; Environment:
  21. ;
  22. ; x86 Real Mode.
  23. ;
  24. ; Revision History:
  25. ;
  26. ;
  27. ;--
  28. FONT_POINTERS EQU 700h ; physical addr to store font pointers
  29. ; This is also the DOS loaded area
  30. .386
  31. _DATA SEGMENT PARA USE16 PUBLIC 'DATA'
  32. _DATA ends
  33. _TEXT SEGMENT PARA USE16 PUBLIC 'CODE'
  34. ASSUME CS: _TEXT, DS:_DATA, SS:NOTHING
  35. ;++
  36. ;
  37. ; VOID
  38. ; GetVideoFontInformation (
  39. ; VOID
  40. ; )
  41. ;
  42. ; Routine Description:
  43. ;
  44. ; This function does int 10h, function 1130 to get font information and
  45. ; saves the pointers in the physical 700h addr.
  46. ;
  47. ; Arguments:
  48. ;
  49. ; None.
  50. ;
  51. ; Return Value:
  52. ;
  53. ; None.
  54. ;
  55. ;--
  56. ASSUME DS:NOTHING
  57. public _GetVideoFontInformation
  58. _GetVideoFontInformation proc near
  59. push ds
  60. push es
  61. push bp
  62. push bx
  63. push si
  64. mov ax, FONT_POINTERS
  65. shr ax, 4
  66. mov ds, ax
  67. mov si, FONT_POINTERS
  68. and si, 0fh
  69. mov bh, 2
  70. @@:
  71. mov ax, 1130h ; Get font information
  72. int 10h
  73. mov [si], bp
  74. add si, 2
  75. mov [si], es
  76. add si, 2 ; (si)= 8
  77. inc bh
  78. cmp bh, 8
  79. jb short @b
  80. pop si
  81. pop bx
  82. pop bp
  83. pop es
  84. pop ds
  85. ret
  86. _GetVideoFontInformation endp
  87. _TEXT ENDS
  88. END