NeoOS
- 6 Devlogs
- 31 Total hours
NeoOS, a operating system for the x86 architecture. Written in C and using a little bit of assemly.
NeoOS, a operating system for the x86 architecture. Written in C and using a little bit of assemly.
#10h
I don’t have anything to show right now, but as you can see i have 11 more hours on this project.
I have both been working on fixes and some new things needed for the next big thing being: getting to ring 3/usermode.
–WilGulf
The kernel now has my implementation of paging working. If you don’t know what paging is, it is basically a way of managing the memory that is used by most x86 operating systems.
The paging implementation took some C files and some updates to the assembly files but now it is done!
Now I have many ways to go with what to implement next. We’ll see what i choose.
–WilGulf
Now I got the IDT working. You can see it is working cause when that “Divide By Zero” message appears the kernel does a division with a zero. Normally that would make the kernel start bootlooping but now the interrupt handler handles the divide by zero and stops the kernel instead.
Interrupt handling does not only stop crashes but also allow keyboards or syscalls to invoke interrupts that the kernel can process.
Next step may be to use that interrupt handler to implement syscalls.
– WilGulf
Yes we got it, hello world on the screen. Turns out the loading of the kernel set up the stack wrong. One line of assembly was in the wrong section.
I also continued with the GDT. It isnt something you can see but in the background the GDT has been initialized.
That is my progress so far, now after GDT comes some interrupt handling.
–WilGulf
Well as I said, I would continue with getting Hello World on the screen. Well that wasn’t hard to do the “simple” way, just pasting several lines for each letter. But I wanted to do it the real way, implement a writer function.
But thats where it went wrong. When compiling and booting after adding that function content it wouldn’t boot.
And that is wierd cause when i removed the bytes[i] line it booted. Somehow my kernel cant handle it. I don’t know what could currently be causing this.
Well i will of course try to solve this myself or find a way to make the writer work.
And if you have any knowledge in C and os development please help me.
The projects current code can be found on my github.
– WilGulf
I wanted to leave assembly and start to use C. But to do that I need to call the main function in C from assembly.
Much googling and testing later I got it to actually use the main functions while loop to keep itself from bootlooping. Never thought i would be so happy about completing the first and easiest task in os development.
I will comeback with another post when i get ‘hello world’ on the screen.