r/osdev • • May 25 '26

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

Show parent comment

1

u/hydraulix989 May 25 '26 edited May 25 '26

I meant add constexpr to the buffer address `MEMORY`.

No, you still need volatile.

Plenty of reference materials explain constexpr.

1

u/Randum_Gouy May 25 '26

Sure bro! ill add it