"Most people write Hello World in C. I wrote mine in Assemblyโฆ and booted it."
Yes. It's simple. But it's booted with love. โค๏ธ
A tiny, minimal operating system that boots directly from a .img file, shows a "Hello, World!" message using BIOS interrupts, and displays a cute signature line โ all in 16-bit real mode Assembly.
- NASM โ The Netwide Assembler (to write and compile x86 Assembly code)
- QEMU โ Emulator to run and test your bootable image
- BIOS Interrupts โ Like
int 0x10for controlling screen output - Hex and Boot Signatures โ
0x7C00offset and0xAA55at the end for boot sector
- Assembly Language โ This OS is written in pure 16-bit x86 Assembly (real mode).
- BIOS Boot โ When you boot from the image, BIOS loads the first 512 bytes (the boot sector) from the drive into memory at
0x7C00. - Video Interrupts โ We use
int 0x10(BIOS video service) to print text to the screen. - No OS dependencies โ Itโs raw metal. Your code runs directly on the hardware.
- Boot Signature โ The last two bytes are
0xAA55, which tells the BIOS it's a valid boot sector.
- ๐ฅ๏ธ Bootable image (
.img) that runs on any x86 machine/emulator. - โ๏ธ Prints "Hello, World!" and a custom line: "Booted with love ;)"
- โ๏ธ Works both on 32-bit and 64-bit emulators
- ๐ Pure assembly, no C, no OS, no clutter โ minimalism at its best
- ๐จโ๐ป A beginner-friendly intro to low-level system programming
git clone https://github.com/Sreeju7733/helloworld-os.git
cd helloworld-osnasm -f bin main.asm -o helloworld.imgqemu-system-x86_64 -drive format=raw,file=helloworld.img๐ช And boom! Youโll see "Hello, World!" + your lovely message.
P.S. Even though itโs small, itโs technically a real operating system. ๐