Greetings everyone !
Though I did not find as much time and motivation to work on the OS as I would have wished (holidays are just better for code ^^), that doesn’t mean there’s no progress ! Because finally, my paging management class can fully initialize itself, mapping the kernel’s virtual memory in a page-perfect fashion. (The more I write C++ code, the more I think that constructors are the hardest part to write in a class)
All I have to do now is to code its member functions (should be rather easy, some algorithms can be stolen from my physical memory management code). Then, it’ll be time to religiously write my kernel-level memory allocator. And once I have this… A new world of opportunities is unfolding. I’ll probably start by cleaning up and reviewing memory management in depth, and then it’ll be time for work on interrupt management (leading to keyboard input and threads/processes/scheduling in the future)…
The good thing with the beginning of a big project like an OS is that you always have something interesting to do. The bad thing is that you always feel guilty when you see the amount of work left and think that you could have done more…
Oh, and by the way, I’ve got a challenge for readers, if I did not make all of them flee in disgust already : I have some issues with my debug stream and don’t know how to get rid of them. Maybe someone with C++ knowledge can help me ?
- My dbgout class does not accept pointers as entry types. So normally, dbgout << some_pointer should not be compiled and result in some horrible error message.
However, since I introduced support for boolean input (using the standard “bool” type), this does not happen anymore. Instead, pointers of any type are interpreted as boolean values. WTF ???
- To control the way output is handled, I introduced modifiers, in a STL-like fashion. As an example, dbgout << txtcolor(TXT_LIGHTRED) changes text color to light red. Internally, this works using classes (in this case the DebugAttributeChanger class) and operator overloading.
Problem is, using a modifier several times fails.As an example, dbgout << txtcolor(TXT_LIGHTRED) << “RED” << txtcolor(TXT_LIGHTGRAY) << “GRAY”; will result in a “REDGRAY” text output uniformally colored in red. Same goes for every single other modifier I’ve created. Does anyone have a clue about why this is happening ?