0

Well anybody pls try this:
i will give an address that is 0xB8000
Now u write a function in which we can write a string and define its colour so you write the string in that memory area and increment it, and again write the colour info in that area and increment it..
The prototype of function will be
void print_string(int colour, const char *string);

remember you write the first letter of string and then increment the address by one and again write the colour and increment the address by one and do that until you write all that string in the memnory area that i gave u. ie 0xB8000

Finally if i write "HI" after writing in memoory it will have

0xB8000 | 0xB80001 | 0xB8002 | 0xB8003
H | colour | I | colour

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by gusano79
0

Well anybody pls try this:
i will give an address that is 0xB8000
Now u write a function in which we can write a string and define its colour so you write the string in that memory area and increment it, and again write the colour info in that area and increment it..
The prototype of function will be
void print_string(int colour, const char *string);

remember you write the first letter of string and then increment the address by one and again write the colour and increment the address by one and do that until you write all that string in the memnory area that i gave u. ie 0xB8000

Finally if i write "HI" after writing in memoory it will have

0xB8000 | 0xB80001 | 0xB8002 | 0xB8003
H | colour | I | colour

That's text mode video memory data on IBM PC compatible machines.

Are you asking someone to write the function for you? Post the code you've tried so far, and we can help.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.