Buck1000 wrote:Does it have to be an unsigned char?
No, an unsigned short is also pretty common. That way, you can write both the character and the attribute byte in a single write, and incrementing the pointer points it to the next character on the screen.
(You could also use a regular char instead of an unsigned one if that's what you meant, but if that's a signed type on your compiler it might be tricky to use attributes with the high bit set)