4 ms·
Kernel development tutorials
- losethos 17y agoAlternatively, get FreeDOS and a DOS assembler. It starts programs in real mode (lets you do anything you want from there). Read the Intel datasheets and write an ASM program to switch to protected mode. There's not just one way to do it. If you can't understand Intel manuals, you're not going to get very far. You can get my TASM version of LoseThos to study. Compile with turbo assembler and launch from freedos. http://www.losethos.com/files/HOPPY.ZIP http://www.losethos.com/files/HOPPY.ZIP If you want to see the fruition of years after that, see http://www.losethos.com http://www.losethos.com. LoseThos is not intended for operating system development -- my assembler has crappy 16-bit support, just enough for bootloaders and my compiler will just make 64-bit code, not 32-bit. A 64-bit compiler is easier because you have more registers. LoseThos will allow you to do anything you want -- runs everything in ring 0, kernel mode. You can launch an operating system from it, but the fun part has been done -- starting in 64-bit mode takes the fun out of learning to switch from 16-32-64. I recommend making a language interpretor from the start because you know you'll want to parse command line expressions for scripts including environment variables. My hoppy version already has an interpreter and is well on it's way to self compiling. If you think operating systems are fun, compilers are much more fun. Seriously. Don't be brainwashed -- compilers can be very simple. There's a tutorial in LoseThos on making a compiler. See /LT/Demo/MiniCompiler.CPZ For that matter, don't be brainwashed on operating systems -- embedded systems often have schedulers you can write in a couple weeks. Is a scheduler an operating system? I think so, unless you're one of the GNU people who say an operating system must include tools ;-) You can test a live CD of LoseThos, it's easy. Go do it.