Made by EdvinasDev_98, 2025
Project files are open-sourced. Please feel free to use them.
Before getting started, please download and install the following tools:
- NASM – Assembler used to compile
.asmfiles into bootable.imgfiles. - QEMU – Virtual machine emulator for testing and running your custom bootloader.
Note: After installing the tools, make sure to add them to your system environment variables so you can run them from any terminal or command prompt.
Inside the Examples/ folder, you will find bootloader examples:
| File Name | Description |
|---|---|
| HelloWorld.asm | - Prints "Hello World!" to the screen. - Includes beginner-friendly comments to help you understand the code. |
| PrintCharacters.asm | - Prints characters from A-Z, a-z, and 0-9 using BIOS interrupts. |
| CheckRAM.asm | - Checks and displays RAM size up to 1 MB (typically around 640 KB). |
| ClearScreen.asm | - Clears the entire text-mode screen by filling it with blank spaces and a specified color attribute. - Resets the cursor position to the top-left corner (row 0, column 0). - Uses direct video memory access and BIOS interrupts to manipulate the screen and cursor. |
| BackgroundColor.asm | - Changes the background color of the entire text-mode screen. - Directly writes blank spaces with the specified background color attribute into video memory. |
| TextFontColor.asm | - Changes the text (foreground) color displayed on the screen while leaving the background color unchanged. |
(Note: VGA_01.jpg and VGA_02.jpg includes a table listing HEX color codes and combinations for use with BackgroundColor.asm and TextFontColor.asm.)
To Compile a Bootloader:
-
Use NASM to assemble the
.asmfile into a raw binary.img:nasm -f bin .asm -o .img
To Run the Bootloader in QEMU:
-
Use QEMU to boot and test your
.imgfile:qemu-system-x86_64 -fda .img