Write your own Operating System in 1 hour
Why Stack Overflow recommends it
Stack Overflow users link it as the tutorial they followed for a hobby C++ kernel, and many of those posts are about debugging a build that does not behave like the one shown in the video.
Recommended by 2 people across 2 different months, 2016 to 2023.
What it is
A roughly one-hour screencast that walks through writing a minimal operating system kernel in C++ with GRUB/Multiboot as the bootloader. It is the first episode of the WYOOS series, using g++, binutils and libc6-dev-i386 on Linux, with later episodes adding interrupts and drivers.
What people said
Recommends Michael Petch · 2019-02 · Stack Overflow · on “How to boot an os completely written in C++?”
On a side note, there is a video series on writing an OS in C++ using GRUB/Mulitboot for a bootloader. It is called WYOOS (Write your own Operating System): [this video] .
Recommends Sofronea Georgian · 2021-06 · Stack Overflow · on “I made a simple hello world ,, kernel ''. It doesn't print anything. What did I do wrong?”
I have followed this tutorial: [this video] in order to write a very very basic hello world after boot, as it seems very complete on the next episodes. My problem is that I cannot see what I've done wrong as I verified twice if my code is exactly the same as in the video. It passes grub and then it is just black screen instead of printing the message. I have tried connecting to the forum in the description to ask questions but it is in German and forum page does not load. So here are the sources: kernel.cpp void printf(char *str) { unsigned short* VideoMemory = (unsigned short*)0xb8000; for(int i=0; str[i]!= '\0'; ++i) VideoMemory[i]=(VideoMemory[i] & 0xFF00) | str[i]; } extern "C" void kernelMai
Cites amanuel2 · 2016-07 · Stack Overflow · on “You need to load your kernel first Error”
Sorry @jweyrich i did not see you post because you didnt mention. Hmm printf implementation? How can that go wrong when the viedo i watched had similar one and worked: [this video] . Im guessing the boot worked because it gave me like a purple screen... BTW Its a "Ubuntu Style(purple)" GRUB Menu
Cites iProgram · 2019-01 · Stack Overflow · on “Custom Freestanding printf only displaying one letter and random capital S”
I am trying to develop my own kernel which I am booting to with GRUB. In order to display strings with variables, I have started to develop my own printf(char*, ...) function. Here is the kernel.cpp (thanks to Write Your Own Operating System YouTube tutorial for the main loading part [this video] (printf is my code entirely)) #include <stdarg.h> #define VGA_BLACK 0 #define VGA_BLUE 1 #define VGA_GREEN 2 #define VGA_CYAN 3 #define VGA_RED 4 #define VGA_MAGENTA 5 #define VGA_BROWN 6 #define VGA_GREY 7 #define VGA_BRIGHT 8 #define VGA_DEFAULT_FG VGA_GREEN #define VGA_DEFAULT_BG VGA_BLACK volatile char* videoMemory = (volatile char*)0xB8000; unsigned int color = ((VGA_DEFAULT_BG<<4) | (VGA_DEFAULT_FG
Cites Pankajan05 · 2019-04 · Stack Overflow · on “How I can connect to mongo db in my java application?”
I want to connect a java application with mongo db so how i can connect mongo db. what kind of driver i must use? is it possible to connect? I followed this youtube tutorial but I can't understand it clearly. [this video]
Cites Ravinder Singh · 2019-09 · Stack Overflow · on “How to understand and debug from a VirtualBox log file?”
I have followed this tutorial [this video] for developing an operating system. I am using Windows 10 as my host sytem and used wsl for compiling. But my VM fails as soon as I enable interrupts. This is the log file [LINK] of the VM that is output, but I cannot understand it. I am pretty naive with VirtualBox. Can someone explain any possible error you see? Here is the code [LINK] of the Os. I just have changed the structure I believe. Rest code in execution point of view is same as shown in video series.
Cites v1n · 2020-09 · Stack Overflow · on “Grub not loading my operating system correctly”
I've just created a basic operating system that prints text onto the screen, based on this youtube tutorial [this video] . The method used in the tutorial is fairly convoluted (I assume) because it uses C++ instead of C. Upon selecting the OS in the Grub menu, the menu closes but the screen stays purple. No text is printed to the screen. I've double checked that my code matches the tutorial but it still doesn't work the same way as it does on his machine. Relevant Hardware: CPU: Ryzen 5 2600 MOBO: Asrock B450-M HDV The files are fairly small, included below. kernel.cpp : void printf(char* str) { unsigned short* VideoMemory = (unsigned short*)0xb8000; for(int i = 0; str[i] != '\0'; ++i) { VideoMem
Cites Rain · 2023-02 · Stack Overflow · on “why code is blocked strange in this function”
I'm writing a tiny system kernel follow this video: [this video] . i meet a problem that doesn't emerge in the video: code just is blocked in getDriver function when PCI controller identify all devices //PCI controller function void PeripheralComponentInterconnectController::selectDrivers(DriverManager* driver_manager,InterruptManager* interrupt_manager){ // printf("{ void PeripheralComponentInterconnectController::selectDrivers\n"); int function_num=0; for(int bus=0;bus<8;++bus){ for(int device=0;device<32;++device){ function_num=deviceHasFunction(bus,device) ? 8:1; for(int function=0;function<function_num;++function){ PeripheralComponentInterconnectDeviceDescriptor dev= getDeviceDescriptor(bus,