void VGA_text(int x, int y, char * text_ptr)
{
int offset;
volatile char * character_buffer = (char *) 0x09000000;
/* assume that the text string fits on one line */
offset = (y << 7) + x;
while ( *(text_ptr) )
{
*(character_buffer + offset) = *(text_ptr);
++text_ptr;
++offset;
}
}
(We're making a hardware-implemented version of "Paint" using an FPGA. (I.E. "code" that could turn your wireless router into a dedicated piece of hardware that acts like paint.)