Tutorial 14: Programming the Kernel 1
Moderator:Moderators
Hey everyone,
Tutorial 14 should hopefully be up within the next week. It basically covers the basic design, developing some basic C++ library routines for us to use, and some HAL code for abstracting some processor information.
The upcoming demo separates the HAL, C++ library, and kernel, all independent projects. Each project outputs to static library files that are linked together. As they are independent of each other, We can more easily support dynamic libraries later if we like.
We will also cover good programming practices, and coding conventions used within the source.
If we have the space, we might also recreate the GDT for use by the Kernel through our HAL and processor interface.
Welcome to the Kernel and HAL!
Tutorial 14 should hopefully be up within the next week. It basically covers the basic design, developing some basic C++ library routines for us to use, and some HAL code for abstracting some processor information.
The upcoming demo separates the HAL, C++ library, and kernel, all independent projects. Each project outputs to static library files that are linked together. As they are independent of each other, We can more easily support dynamic libraries later if we like.
We will also cover good programming practices, and coding conventions used within the source.
If we have the space, we might also recreate the GDT for use by the Kernel through our HAL and processor interface.
Welcome to the Kernel and HAL!
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
It is planned to be completed and up today or tomorrow.pathos wrote:Any update on Tutorial 14?
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
We wont be able to upload anything until the server problem is resolved. Please see <a href="http://www.brokenthorn.com/forums/viewt ... t=56">this post</a> for more information.
We are working with our server host in resolving the problem, and will upload tutorial 14 as soon as possible.
Until then, we will also start working on Tutorial 15. Perhaps we can get two tutorials up during this time frame... Hopefully it is not that long though.
We are working with our server host in resolving the problem, and will upload tutorial 14 as soon as possible.
Until then, we will also start working on Tutorial 15. Perhaps we can get two tutorials up during this time frame... Hopefully it is not that long though.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
If we are still experiencing problems today with uploading to this web site, then we will upload the tutorial to our previous web site location, and link to it from here.
This way the tutorial will be uploaded whether we are or are not experiencing problems.
This way the tutorial will be uploaded whether we are or are not experiencing problems.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Tutorial 14 should be up either later today or tomorrow, along with the new demo source.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
We have just resolved the server problem. We will now be able to upload the new tutorial to this web site.
After final reviews, we will upload it. It is planned to be on tomorrow.
After final reviews, we will upload it. It is planned to be on tomorrow.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Tutorial 15 just been started...its going to be fun
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
I was just using it trying to read from 0x60 for the scancode for my keyboard driver. When I noticed I was getting 255, I started testing random other ports and always got 255.Andyhhp wrote:Can you give a code fragment of where you are using it?
Thanks
This is the keyboard handler I'm using, which is basically the one from Bran's tutorial.
Code: Select all
void keyboard_handler()
{
unsigned char scancode=0x00;
scancode = inportb(0x60);
DebugPrintf ("Key press: %i\n",scancode); // Always displays 255, no matter what port I read above
if (scancode & 0x80)
{
}
else
{
DebugPutc(kbdus[scancode]);
}
}
[edit #1]
I just inportb'd to a signed char instead of an unsigned, and it returned -1. That may help in figuring things out.
Not quite. 0xff unsignes = -1 signed. It should be kept unsigned.I just inportb'd to a signed char instead of an unsigned, and it returned -1. That may help in figuring things out.
I will see if I can resolve the problem a little later when I get home
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com