Page 1 of 1

Set a another 8x8 font in real mode and in protected mode

Posted: Tue Jan 03, 2023 5:02 am
by sytze
I would like to know how to set a different 8x8 vga text font via the bios. I also wonder if I can do this in protected mode as well

Re: Set a another 8x8 font in real mode and in protected mod

Posted: Tue Jan 03, 2023 10:29 pm
by Octocontrabass
sytze wrote:I would like to know how to set a different 8x8 vga text font via the bios.
INT 0x10 AX=0x1100. On VGA, the font will actually be 9x8 by default. If you use INT 0x10 AH=0x12 BL=0x30 to reduce the vertical resolution, the character width will be reduced to 8 pixels too. As far as I know, there's no way to reduce the character size to 8x8 using the BIOS without also reducing the vertical resolution.
sytze wrote:I also wonder if I can do this in protected mode as well
You can directly manipulate the VGA registers to do anything the BIOS does. If you really want to, you can try using virtual 8086 mode to run the BIOS code, but this might not work very well on modern PCs.

Modern UEFI-only PCs don't have VGA compatibility; VGA requires a legacy BIOS (or UEFI CSM).