This project follows the videos from screeck on how to create a bootloader.
This is a cool little project to start using x86 asm and understading a little more about how a computer boots things.
This was also a really nice way to discover the OSDev.org page as a source for OS learning and development.
On the first video the main goal was to boot Hello World! to the screen using BIOS functions, in this case the function with the interruption 0x10 in mode 0xE to print characters to the screen.
In this part was important to specify the org and the mode:
[BITS 16] ; Code mode
[ORG 0x7c00] ; Where code startsAnd also to make sure there is no garbage in the sector and it is signed correctly:
times 510 - ($ - $$) db 0 ; Fill with 0s until 510 bytes
dw 0xAA55 ; Little endian wordAll the code is in boot.asm.
This video is about the Global Descriptor Table, a data structure that has the GDTR as a pointer to the different contents of the table. The purpose is to set the CPU in 32 bit protected mode.
All the code is in protected.asm.
In the first part of this video we make a cross-compiler with gcc and binutils to be able to compile to the architecture of the emulator. Then linking the C code to run the kernel.