mov bx , 0x4117 ;设置显示模式1024 * 768 ( 5:6:5 )
int 0x10
{
uint16 ModeAttributes ;
uint8 WinAAttributes ;
uint8 WinBAttributes ;
uint16 WinGranularity ;
uint16 WinSize ;
uint16 WinASegment ;
uint16 WinBSegment ;
uint32 WinFuncPtr ;
uint16 BytesPerScanLine ;
uint16 XResolution ;
uint16 YResolution ;
uint8 XCharSize ;
uint8 YCharSize ;
uint8 NumberOfPlanes ;
uint8 BitsPerPixel ;
uint8 NumberOfBanks ;
uint8 MemoryModel ;
uint8 BankSize ;
uint8 NumberOfImagePages ;
uint8 Reserved_page ;
uint8 RedMaskSize ;
uint8 RedMaskPos ;
uint8 GreenMaskSize;
uint8 GreenMaskPos ;
uint8 BlueMaskSize;
uint8 BlueMaskPos ;
uint8 ReservedMaskSize ;
uint8 ReservedMaskPos ;
uint8 DirectColorModeInfo;
uint16 *PhysBasePtr ;
uint32 Reserved2 ;
uint16 Reserved1 ;
uint16 LinBytesPerScanLine ;
uint8 BnkNumberOfPages ;
uint8 LinGreenMaskSize ;
uint8 LinGreenFieldPos ;
uint8 LinBlueMaskSize ;
uint8 LinBlueFieldPos ;
uint8 LinRsvdMaskSize ;
uint8 LinRsvdFieldPos ;
uint32 MaxPixelClock ;
}mode_info;
mov es , bx
mov di , 0x0
mov ax , 0x4f01
mov cx , 0x117
int 0x10
video_base=p->PhysBasePtr; //把模式信息中Linear Frame Buffer 地址取出来赋给
101h - 640x480 256 109h - 132 25
102h 6Ah 800x600 16 10Ah - 132 43
103h - 800x600 256 10Bh - 132 50
104h - 1024x768 16 10Ch - 132 60
105h - 1024x768 256
106h - 1280x1024 16
107h - 1280x1024 256
10Dh - 320x200 32K (1:5:5:5)
10Eh - 320x200 64K (5:6:5)
10Fh - 320x200 16.8M (8:8:8)
110h - 640x480 32K (1:5:5:5)
111h - 640x480 64K (5:6:5)
112h - 640x480 16.8M (8:8:8)
113h - 800x600 32K (1:5:5:5)
114h - 800x600 64K (5:6:5)
115h - 800x600 16.8M (8:8:8)
116h - 1024x768 32K (1:5:5:5)
117h - 1024x768 64K (5:6:5)
118h - 1024x768 16.8M (8:8:8)
119h - 1280x1024 32K (1:5:5:5)
11Ah - 1280x1024 64K (5:6:5)
11Bh - 1280x1024 16.8M (8:8:8)
81FFh Special Mode (see below for details)