My current state of mind after three weeks of OSDev
Posted: Wed Jun 10, 2009 2:06 pm
I found that it might be at least interesting if I put this down, just for the heck of it.
I started OSDev about three weeks ago. I feel good. It's very awesome, to be able to logically dissect a PC system, and put together a working, smooth, able-to-run bit of code.
However: Progress log of a noob. Before I begin, so as to help you understand what how I've worked, I have a generally high standard that I set for myself, and therefore, I have forced myself NOT to use anyone's code prepackaged. The only code I've taken from anywhere was the C++ Barebones (I've Dev'ing in C++) linker.ld script, and a small bit of the assembly from the Loader.s file.
By incorporating that with the C++ implementation of Constructor & Destructor calling I found at this site, I wrote out my own code by hand to add C++ class support. (I felt really good after that, for sure.) Oh, and for anyone reading this, and wanting to know how to go about starting off a C++ kernel, that link is pretty good. The man who wrote it didn't use ASM for anything other than his outb etc. functions, and everything is done in pure C++. It's good for a newbie, but you should probably seriously consider at least getting the basics of Asm down right.
I hate the idea of using even that bit of prewritten code, not because It's bad code. Far from it, but because I want o know that my kernel is entirely mine.
I started off barely understanding that much about how a computer works, and when I originally began, I couldn't even competently understand past the first page of the jamesmolloy kernel concept tutorial.
Yesterday, I successfully sat down and read all the way up to part 6, and felt really proud.
However: I'd like to state that you should always keep up with the code. Don't keep reading and not writing and implementing. A form of cathartic complacency has gripped me, and I realized it today. It's like..."Oh man. I'm so good. I can get thats stuff done in no time."
Yet all I've really done so far is get a bootable kernel by using grub, and implemented a VGA driver with scrolling, and whatnot. I've learned a whole lot, and I can easily go on now, into setting up interrupts, then the keyboard, and memory, but yet I haven't.
Why? I let it get to my head. I just was wondering: did this happen to anyone else? I learned an extremely valuable lesson today. You don't mean **** if you only know in your head, but can't implement.
Despite my "growth" in knowledge, I still have an extremely crude VGA implementation that uses about six overloaded versions of the same function (I called it putline()) to write to the screen, all for different types of output, and other reasons.
Not only is it crude, but it's also out of spec with what my original OS concept was.
I implemented the VGA driver as a directly manageable Real mode class, rather than as an abstract "stream" which was my idea.
My code has hardly any structure. I'm learning the invaluable importance of PROPER DESIGN.
I, with my current code have to call several different functions just to output to the screen.
I've decided to start over frm where I believe it would be wise, in keeping with the overall original concept of my OS, and implement a proper, or at least adjustable, and working Standard Library. Otherwise all that talk about my "Win Pool" idea was just that: talk.
I see how newbies really get in over their heads, and I see the humbling effect that OSDev has on a programmer. I honestly now comprehend the immense amount of time it will take to PROPERLY go about writing a stable, well structured OS.
I have everyone at OSDev, and especially the more experienced users, for just being so awesome. I try not to post any questions, and to rough it out, and learn what I need to on my own stakes, and so far I find that It's fully possible. But it's also good to read their posts and quietly meditate on what they say. Think about all of the possible meanings that thier statements can have, and examine the PC not as a static structure, but as a tool. A machine that runs code, and that can be manipuated.
Think outside the box. Just because something is implemented one way doesn't mean that that's the best, or only way to do it.
Once again, I thank the guys on the forum, and I wish all of the newbies who are here now to press on, and learn from the...gold mine that is here.
EDIT: Oh, and to NickJohnson, what you said in my first topic on the forum ever, where you spoke about the bloating concept, and the three stages idea. I found it really intriguing, by the way.
Other than that, I leave you all to your respective projects, and will seriously take mine by the scruff of the neck from now on.
I started OSDev about three weeks ago. I feel good. It's very awesome, to be able to logically dissect a PC system, and put together a working, smooth, able-to-run bit of code.
However: Progress log of a noob. Before I begin, so as to help you understand what how I've worked, I have a generally high standard that I set for myself, and therefore, I have forced myself NOT to use anyone's code prepackaged. The only code I've taken from anywhere was the C++ Barebones (I've Dev'ing in C++) linker.ld script, and a small bit of the assembly from the Loader.s file.
By incorporating that with the C++ implementation of Constructor & Destructor calling I found at this site, I wrote out my own code by hand to add C++ class support. (I felt really good after that, for sure.) Oh, and for anyone reading this, and wanting to know how to go about starting off a C++ kernel, that link is pretty good. The man who wrote it didn't use ASM for anything other than his outb etc. functions, and everything is done in pure C++. It's good for a newbie, but you should probably seriously consider at least getting the basics of Asm down right.
I hate the idea of using even that bit of prewritten code, not because It's bad code. Far from it, but because I want o know that my kernel is entirely mine.
I started off barely understanding that much about how a computer works, and when I originally began, I couldn't even competently understand past the first page of the jamesmolloy kernel concept tutorial.
Yesterday, I successfully sat down and read all the way up to part 6, and felt really proud.
However: I'd like to state that you should always keep up with the code. Don't keep reading and not writing and implementing. A form of cathartic complacency has gripped me, and I realized it today. It's like..."Oh man. I'm so good. I can get thats stuff done in no time."
Yet all I've really done so far is get a bootable kernel by using grub, and implemented a VGA driver with scrolling, and whatnot. I've learned a whole lot, and I can easily go on now, into setting up interrupts, then the keyboard, and memory, but yet I haven't.
Why? I let it get to my head. I just was wondering: did this happen to anyone else? I learned an extremely valuable lesson today. You don't mean **** if you only know in your head, but can't implement.
Despite my "growth" in knowledge, I still have an extremely crude VGA implementation that uses about six overloaded versions of the same function (I called it putline()) to write to the screen, all for different types of output, and other reasons.
Not only is it crude, but it's also out of spec with what my original OS concept was.
I implemented the VGA driver as a directly manageable Real mode class, rather than as an abstract "stream" which was my idea.
My code has hardly any structure. I'm learning the invaluable importance of PROPER DESIGN.
I, with my current code have to call several different functions just to output to the screen.
I've decided to start over frm where I believe it would be wise, in keeping with the overall original concept of my OS, and implement a proper, or at least adjustable, and working Standard Library. Otherwise all that talk about my "Win Pool" idea was just that: talk.
I see how newbies really get in over their heads, and I see the humbling effect that OSDev has on a programmer. I honestly now comprehend the immense amount of time it will take to PROPERLY go about writing a stable, well structured OS.
I have everyone at OSDev, and especially the more experienced users, for just being so awesome. I try not to post any questions, and to rough it out, and learn what I need to on my own stakes, and so far I find that It's fully possible. But it's also good to read their posts and quietly meditate on what they say. Think about all of the possible meanings that thier statements can have, and examine the PC not as a static structure, but as a tool. A machine that runs code, and that can be manipuated.
Think outside the box. Just because something is implemented one way doesn't mean that that's the best, or only way to do it.
Once again, I thank the guys on the forum, and I wish all of the newbies who are here now to press on, and learn from the...gold mine that is here.
EDIT: Oh, and to NickJohnson, what you said in my first topic on the forum ever, where you spoke about the bloating concept, and the three stages idea. I found it really intriguing, by the way.
Other than that, I leave you all to your respective projects, and will seriously take mine by the scruff of the neck from now on.