You are browsing as a guest. Sign up (or log in) to start making projects!

NeoOS

  • 6 Devlogs
  • 31 Total hours

NeoOS, a operating system for the x86 architecture. Written in C and using a little bit of assemly.

Open comments for this post

11h 8m 5s logged

#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

0
0
1
Open comments for this post

4h 50m 52s logged

Now we got progress!

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

0
0
1
Open comments for this post

7h 9m 15s logged

IDT Done!

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

0
0
1
Open comments for this post

2h 32m 50s logged

Hello

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

0
0
1
Open comments for this post

3h 20m 11s logged

HELP

What is wrong?

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.

  1. I started with making a function to clear the framebuffer from that “Booting…” message. And also moving the cursor to the start.
  2. Then I continued with the writer. The writer took two parameters: (char *buf, unsigned int len). Both arguments needed.
  3. The function i began testing with calling it from kmain like this: writer(“hello”, 5) .
  4. Then in the function i processed it like this:

unsigned char *bytes = (unsigned char *)buf;
for (unsigned int i = 0; i < len; i++) {
fb_write_cell(pos * 2, bytes[i], 0x0F, 0x00);
pos++;
}

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.

What now?

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

0
0
1
Open comments for this post

1h 48m 2s logged

I got my OS booting without entering a bootloop!!!

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.

0
0
33

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…