Little note at first, if you want use graphic mode and you want use BIOS, dont work with VGA, implement VESA, it contain all modes what you need. VGA is good if you want write driver for graphic card, because you can learn a lot about it.
How use particular mode? At first you must make a decision if you want start graphic mode from BIOS, or without BIOS. If you dont want use BIOS, complete code is in
http://files.osdev.org/mirrors/geezer/osd/graphics/modes.c .
Here is code for writing pixels:
Code:
void write_vga_pixel(uint32_t line, uint32_t column, uint8_t color) {
uint8_t *vga_memory = (uint8_t *) 0xA0000;
uint32_t offset=0;
offset=( (line*320) + column);
vga_memory[offset]=color;
}