| It is currently Fri Sep 10, 2010 2:55 pm |
|
All times are UTC |
Moderator: Andyhhp
|
Page 1 of 1 |
[ 3 posts ] |
| Print view | Previous topic | Next topic |
| Author | Message |
|---|---|
|
Joined: Sun Jan 24, 2010 2:20 pm Posts: 23 |
This tutorial has an error in it: http://www.brokenthorn.com/Resources/OSDev10.html
Quote: The attribute byte is a byte that defines certain attributes, and defining both foreground and background colors. The byte follows the format: * Bits 0 - 2: Foreground color o Bit 0: Red o Bit 1: Green o Bit 2: Blue * Bit 3: Foreground Intensity * Bits 4 - 6: Background color o Bit 4: Red o Bit 5: Green o Bit 6: Blue * Bit 7: Blinking or background intensity Bits 0 -2 & 4 - 6 are actually backwards for some reason, so it should read as: Quote: * Bits 0 - 2: Foreground color o Bit 0: Blue o Bit 1: Green o Bit 2: Red * Bit 3: Foreground Intensity * Bits 4 - 6: Background color o Bit 4: Blue o Bit 5: Green o Bit 6: Red * Bit 7: Blinking or background intensity Yes, it does seem odd. Until you think of it like the way we read English, right to left. So you'd start from bit 7 and read to bit 0, thus reading the color bits as R,G,B! 0x9A or 10011010b -- You get blinking green text with blue background. Then try... 0xCA or 10001010b -- Same thing, but red background. 0x11 or 00010001b -- Totally blue, can't even see it if you have blue BG! Not so weird when you think about it, is it? |
| Thu Feb 04, 2010 5:39 pm |
|
|
Site Admin Joined: Sat Oct 20, 2007 7:58 pm Posts: 359 |
Hello,
I believe you are correct, sorry for the error. It will be corrected _________________ Lead Programmer for BrokenThorn Entertainment, Co. Website: http://www.brokenthorn.com Email: webmaster@brokenthorn.com |
| Sat Feb 06, 2010 12:23 am |
|
|
Joined: Sun Jan 24, 2010 2:20 pm Posts: 23 |
Ah, no need to apologize, my friend!
|
| Sat Feb 06, 2010 3:10 am |
|
|
Page 1 of 1 |
[ 3 posts ] |
Who is online |
Users browsing this forum: No registered users and 1 guest |
| You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum |