For display information detection, it must support VBE (BIOS-level extension of VESA ). When the monitor supports this extension, it is called through the BIOS in the system real mode.
Int 10 h to obtain detailed information about the monitor.
You may need to call the following BIOS sub-functions:
Ah = 0x4f00
Obtain BIOS-level extensions for the VESA of the monitor
Ah = 0x4f01
Obtain a specific Display Mode Supported by the monitor
Ah = 0x4f02
Set the current video mode
Ah = 0x4f03
Obtain the current video mode
Ah = 0x4f04
Save/restore svga Display Mode
Ah = 0x4f15
Obtain the monitor's edid Extension Information
You can find some compilations in the kernel source code.CodeFor example, under ARCH/i386/boot/video. S:
# Get video mem size
Leaw modelist + 1024, % di
Movw $0x4f00, % ax
Int $0x10
Xorl % eax, % eax
Movw 18 (% di), % ax
Movl % eax, % FS :( param_lfb_size)
You can view the VBE documentation.
You can also use the C language.
You can also view the Code related to frambuffer.