Function 02h - Set VBE Mode
Input: AX = 4F02h Set VBE Mode
BX = Desired Mode to set
D0-D8 = Mode number
D9-D10 = Reserved (must be 0)
D11 = 0 Use current default refresh rate
= 1 Use user specified CRTC values for refresh rate
D12-13 Reserved for VBE/AF (must be 0)
D14 = 0 Use windowed frame buffer model
= 1 Use linear/flat frame buffer model
D15 = 0 Clear display memory
= 1 Don't clear display memory
ES:DI= Pointer to CRTCInfoBlock structure
Output: AX = VBE Return Status
Note: All other registers are preserved.
The CRTC information block has the following structure:
CRTCInfoBlock struc
HorizontalTotal dw ? ; Horizontal total in pixels
HorizontalSyncStart dw ? ; Horizontal sync start in pixels
HorizontalSyncEnd dw ? ; Horizontal sync end in pixels
VerticalTotal dw ? ; Vertical total in lines
VerticalSyncStart dw ? ; Vertical sync start in lines
VerticalSyncEnd dw ? ; Vertical sync end in lines
Flags db ? ; Flags (Interlaced, Double Scan etc)
PixelClock dd ? ; Pixel clock in units of Hz
RefreshRate dw ? ; Refresh rate in units of 0.01 Hz
Reserved db 40 dup (?) ; remainder of ModeInfoBlock
CRTCInfoBlock ends
The Flags field defines the following flags that modify the operation of the mode as follows:
D0 = Double Scan Mode Enable
0 = Graphics mode is not double scanned
1 = Graphics mode is double scanned
D1 = Interlaced Mode Enable
0 = Graphics mode is non-interlaced
1 = Graphics mode is interlaced
D2 = Horizontal sync polarity
0 = Horizontal sync polarity is positive (+)
1 = Horizontal sync polarity is negative (-)
D3 = Vertical sync polarity
0 = Vertical sync polarity is positive (+)
1 = Vertical sync polarity is negative (-) |
|