Terminal address and dimensions
Terminal address and dimensions
I followed the bare bones tutorial. I could not figure out how the terminal address dimensions were chosen. I tried changing the vga width and height and got unexpected results. How were these chosen and determined?
-
- Member
- Posts: 5560
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Terminal address and dimensions
Bare Bones assumes VGA-compatible text mode 03h, which is 80x25 characters. If you want a different video mode, you'll have to either specify it in your multiboot header (and read the boot information to ensure GRUB actually set the mode you want!) or directly manipulate the VGA registers.
On the other hand, if you want to keep using the 80x25 text mode but only display text on a smaller portion of the screen, you can modify terminal_putchar() to use different minimum and maximum row/column values.
On the other hand, if you want to keep using the 80x25 text mode but only display text on a smaller portion of the screen, you can modify terminal_putchar() to use different minimum and maximum row/column values.