gram to crash.</p>

<pre>
Uint8 *VGA = (Uint8 *)0xA0000000L;

#define SCREEN_WIDTH 320  /* width in pixels of mode 0x13 */
#define SCREEN_HEIGHT 200 /* height in pixels of mode 0x13 */

void
plot_pixel(Uint16 x, Uint16 y, Uint8 color)
{
	VGA[y * SCREEN_WIDTH + x] = color;
}
</pre>

<h3>Palette</h3>

<p>To set one color in the palette, write the color index to port 0x3C8 and then write the red, green, and blue values, in order, to port 0x3C9. The VGA only gives us 6 bits per color channel.</p>

<pre>
void
se