-
Notifications
You must be signed in to change notification settings - Fork 0
Simple bootloader.
Welcome to our first part of building your own operating system that is going to work. Let's get started with important things. You should understand what are you are going to do. It's not just a program.
We need in the bootloader that it will boot our kernel and jump to the kernel. Our kernel should to located in the 0x8000 address, but it's not an x86 guide and we have our own addresses, "cells". Every cell can contain 1 character, if you are going to write so much text, you can use "" in C++, but CHAR is not like it and we have an idea. Let's make an array that is going to store our data by every character, after loading your data in the processor's cache, everything that is we need to do, just write every character from cache to the memory, and our processor (MARCH W v0.1-beta) know how to do that thing. And, how we can say to the bootloader where is located our kernel? We have to register our C++ Function in the memory and after this use "jmp" to jump on it.
#include "./arch/assembly.hpp"
void Kernel() {
/*
* We have to show text on our display with GPU.
* GPU - Virtual Unknown Graphics Adapter.
*/
Graphics::ant_wrt_gpu_lnn_w(0, "Hello, World!");
Graphics::GPUStart();
}
int main()
{
processor::reg(Kernel); // We registed the Kernel! He is located in "0".
processor::jmp(0); // Jump!
}This code going to do a few things.
- Start our CPU
- Register our kernel and create a link to it.
- Jump to the Kernel.
- Write to GPU's Memory our message.
- Start GPU!
- Have fun with "Hello, World!" on our virtual display. Thank you for reading our guide. Goodbye.
Latest stable release: v0.1-beta (Pre-release) Latest CPU Codename: Ice I. Latest CPU Functions count: 12
Short description: First our version is based on C++. You can use it as much as you would. Welcome to The Assembler World!