r/osdev 7d ago

My FIRST ever Kernel - OSDev Wiki BareBones

Took me 2 days but i have "Hello World" on a black screen now!

For those thinking, "Why gdb?" - well i was trying to debug a small bug, which turned out to be changing this -

    inline uint16_t *buffer = (uint16_t *)vga::MEMORY;

to

    inline uint16_t *buffer = reinterpret_cast<uint16_t *>(0xB8000);

Yes, i was using C++ for this.

Github link: https://github.com/reyaansh-mishra/Build-A-Kernel/

26 Upvotes

18 comments sorted by

View all comments

4

u/compgeek38400 7d ago

Congrats! You are off a d running

2

u/Randum_Gouy 7d ago

Thanks man!

Right now im working on implementing a Scrollback Buffer, any tips?

4

u/compgeek38400 7d ago

I havent done the scrollbar buffer yet. Tomorrow I work on the APIC. But id suggest doing the meaty skeleton next. Its a much better base to start from

2

u/Randum_Gouy 7d ago

sure man!
btw i got the scrollback working - its actually quite simple

should i explain my implementation?

2

u/compgeek38400 7d ago

I know what I want to do on scrollback, but it isnt high on my list at the moment.

Im thinking I should do some rework, and set my kernel to the upper half

1

u/Randum_Gouy 7d ago

sure - but i dont really get the point of putting the kernel of the upper half

whats wrong with putting applications on the upper half? I mean, its really a question of depriving the kernel of resources, or depriving the apps of resources

1

u/compgeek38400 7d ago

From what im reading, there is reserved memory in the upper half. It will definitely be easier to write a kernel around it than the user space.

Also, if I can do it, it proves I actually understand virtual memory, and am not just lucky it works

1

u/Randum_Gouy 7d ago

ohk

thanks mate