mya
is a fun project to create a tiny OS from scratch using x86 assembly and C programming language.
You can either read each episode from the doc section or Medium.
For each episode that includes code, there is a corresponding release with the same name as the episode.
- episode 0: introduction to the journey of making tiny OS
- [
introduction
]
- [
- episode 1: my understanding of CPU and Memory interaction
- [
the need for labels
,era of uni programming and multiprogramming
,linker and Hardware/software based relocation
,segmentationm
,OS loader
]
- [
- episode 2: write our very first tiny bootloader
- [
flat binary
,assembler base address
,org directive
,far jump
]
- [
- [
writing a simple bootloader
,using bios interrupt 0x10
,qemu kickstart
]
- [
- episode 3: Tracing Stack and Function Calls with GDB
- [
stack registers: SS, SP, BP
]
- [
- [
start using GDB
,define stack
,add some functionality to bootloader
,start using makefile
,trace stack
]
- [
- episode 4: CPU interaction with memory and IO
- [
cpu interaction with RAM and ROM via address and control bus
,CPU address space
,binary black magic
,Memory mapped I/O
,Isolated mapped I/O
]
- [
- episode 5: switch to protected mode
- [
Global Descriptor Table (GDT)
,CHS addressing
,absolute vs relative addressing
,protectd mode
]
- [
- [
writing second stage bootloader
,implementing GDT
,switch to protected mode
,using bios interrupt 0x13 and CHS
]
- [
- episode 6: migrate preparation
- [
why migrate to c
]
- [
- [
build toolchain (GCC, linker, assembler)
]
- [
- episode 7: migrate to C
- [
linker script
,compiler and linker options: -nostdlib -lgcc -ffreestanding
,C compilation environment: Freestanding and Hosted
,C call conventions
]
- [
- [
writing linker script
,migrate from assembly to C
,start writing kernel with C
]
- [
More episodes will be determined soon.
You can also access these episodes on Medium via this link: flydeoo