User guide
SFSU - Embedded Systems Tutorial Nano- Electronics & Computing Research Lab
65
sprintf (text,"%d & %d = %d ",number1,number2,number1 & number2);
}
else
{
sprintf( text_top_VGA, "My ALU");
sprintf (text,"%d | %d = %d ",number1,number2,number1 | number2);
}
Characters are written on the screen through “VGA_text” function.
void VGA_text(int x, int y, char * text_ptr)
{
int offset;
volatile char * character_buffer = (char *) 0x00101000; // VGA character buffer
offset = (y << 7) + x;
while ( *(text_ptr) )
{
*(character_buffer + offset) = *(text_ptr); // write to the character buffer
++text_ptr;
++offset;
}
}
You can obtain the software code by opening the main.c file which is attached with this
tutorial.