I like low level programming and old computers. So, I am writing operating system for x86 (486) in C++.
I have support for (relatively) many things now, so it is probably good time to boot it on a real PC and check what will not work there.
I have support for (relatively) many things now, so it is probably good time to boot it on a real PC and check what will not work there.
It was a long journey and it will be much longer.
At first, I wanted to learn assembly during the development, so I tried to write whole OS in nasm. It had many features, but there was some issue with ISA DMA, and access to floppy drive caused... strange behavior. And without paging and protected mode, it was a mess to debug. So I had to halt development of this mess.
To regain energy for fixing it, I have started new OS project in C++, with goal of writing as few features as needed and going to protected mode with paging as fast as possible. I still don't understand paging algorithms fully.
Anyway, this project went super fast and let me learn many things, instead of debugging only... so it became my main OS project. But debugging was also better, using qemu and attached gdb, instead of pure asm and bochs' internal debugger.
About debugging, it was very funny, that after enabling optimizations in compiler, code went crazy and was crashing in places where it shouldn't. Who would know that having functions with missing return statements can cause wrong execution of code...
At first, I wanted to learn assembly during the development, so I tried to write whole OS in nasm. It had many features, but there was some issue with ISA DMA, and access to floppy drive caused... strange behavior. And without paging and protected mode, it was a mess to debug. So I had to halt development of this mess.
To regain energy for fixing it, I have started new OS project in C++, with goal of writing as few features as needed and going to protected mode with paging as fast as possible. I still don't understand paging algorithms fully.
Anyway, this project went super fast and let me learn many things, instead of debugging only... so it became my main OS project. But debugging was also better, using qemu and attached gdb, instead of pure asm and bochs' internal debugger.
About debugging, it was very funny, that after enabling optimizations in compiler, code went crazy and was crashing in places where it shouldn't. Who would know that having functions with missing return statements can cause wrong execution of code...