Skip to content

Quang-Tr/making-an-OS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Making an OS (x86)

This is my code to learn a little bit assembly when I came across the interesting YouTube playlist "Making an OS (x86)" by Daedalus Community. Its aim is to create a 512-byte-long boot sector in nasm, an assembler for the x86 CPU architecture.

Requirements

Besides nasm, the machine emulator qemu must also be installed. I tested my code in Kali WSL, so it should work in other Linux distros too. For Debian-based distro, you can use:

sudo apt install nasm qemu-system

Structure

The asm and bin files are located in the directories that correspond to the videos as follows:

Directory Description Reference video
boot2 Print the alphabet in alternating caps aBcD... Chapter 2 - BIOS, Printing the Alphabet, Conditional Jumps
boot3 Store and relay keyboard input Chapter 3 - Strings, Keyboard Input in BIOS
boot4 Convert 16-bit hex to dec Chapter 4 - Stack, Functions, Segmentation
boot5 Read disk with failure detection Chapter 5 - Reading the disk with BIOS
boot6 Global Descriptor Table and text UI in 32-bit protected mode Chapter 6 - Entering Protected mode, GDT

The repository structure visualized by boot6.asm, adapted from Midnight Commander

To boot, use the script boot.sh with the directory number. E.g., for boot2:

./boot.sh 2

References

(As recommended by Daedalus Community)

About

My little Assembly journey to the boot sector

Topics

Resources

Stars

Watchers

Forks