Error in wiki page

All about the OSDev Wiki. Discussions about the organization and general structure of articles and how to use the wiki. Request changes here if you don't know how to use the wiki.
Post Reply
vhg119
Member
Member
Posts: 71
Joined: Fri Aug 24, 2007 5:56 pm
Location: CA, USA

Error in wiki page

Post by vhg119 »

The page: http://www.osdev.org/mediawiki/index.php?title=Text_UI
has an error in the sample code.

It should be something like:

void kprintc(int x, int y, unsigned char bc, unsigned char fc, unsigned char c)

{

unsigned short attrib = ((bc << 4) | (fc & 0x0F)) << 8;

volatile unsigned short *where;



where = 0XB8000 + ((y*160) + (x*2));

*where = c | attrib;

}
frank
Member
Member
Posts: 729
Joined: Sat Dec 30, 2006 2:31 pm
Location: East Coast, USA

Post by frank »

Is that better? Note where = 0xB8000 + (y * 80 + x); is correct because we are working with words.
Post Reply