I have a function to print characters on the screen that is like this:
void print(int colour, int y, int x, const char *string)
{
volatile char *video=(volatile char*)0xB8000 + y*160 + x*2;
while(*string != 0)
{
*video=*string;
string++;
video++;
*video=colour;
video++;
}
}
And I want to print the character 254 in decimal, but I need to use stored on a const char*
. I can't try print(0x0F, 0, 0, 0xFE);
, because this trows a error of pointer without cast, then how can I do this?