Search code examples
graphicsoperating-systembootloaderbios

Video mode used by BIOS


After writing a 2-stage bootloader and viewing the output :

Output from QEMU

The first stage's output (produced by using BIOS' int 10h interrupt) has a different white (or is it gray?) than the one obtained by directly accessing video memory in protected mode.

Why is this different ? What video mode does BIOS use ?


Solution

  • The BIOS starts up in mode 0, with the color attribute byte as 0x07 (black background, gray foreground). The 2nd white seems to be 0x0F, as the bright bit is set (0x08 is brightness bit, simply add it to the color to get the bright colors).