Windows NT 4.0 source code leak
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.
 
 
 
 
 
 

82 lines
1.4 KiB

title "XGA ASM routines"
;
;++
;
; Copyright (c) 1992 Microsoft Corporation
;
; Module Name:
;
; xgahard.asm
;
; Abstract:
;
; This module implements the banding code for the XGA
;
; Environment:
;
; Kernel mode only.
;
; Revision History:
;
;
;--
.386p
.xlist
include callconv.inc
.list
_TEXT SEGMENT DWORD PUBLIC 'CODE'
ASSUME DS:FLAT, ES:FLAT, SS:NOTHING, FS:NOTHING, GS:NOTHING
;
;
; Input:
; EAX = desired bank mapping
;
; Note: values must be correct, with no stray bits set; no error
; checking is performed.
;
public _BankSwitchStart
public _BankSwitchEnd
public _ApertureIndexRegister
;
; Aperture index register is the address of the absolute value in the
; mov instruction
; We do this so that the miniport can go an write the user mode virtual
; address of Aperture Index Register directly in the code, so we can
; then copy it to the display driver address space.
;
;
; Another inetersting side effect is that on X86 machines, to suppport
; v86 mode, the bottom MEG of memory is mapped
;
;
;
_ApertureIndexRegister dd _BankSwitchStart + 1
align 4
_BankSwitch proc ;start of bank switch code
_BankSwitchStart:
mov edx, offset _BankSwitchEnd
out dx, ax
ret
_BankSwitchEnd:
_BankSwitch endp
_TEXT ends
end