Bootloader and a Kernel from scratch 16bits assembly and C.
This project was made for learning proposes (not a production ready code).
Implemented Bootloader code using Assembly 16bits:
- Header for floppy image.
- Print to screen.
- Read and load kernel from other files into memory.
Implemented Kernel code using C and Assembly 16bits:
- put, puts, put_f.
- printf.
This project was originally made by OliveStem on YT, Playlist.
The original Github project
$ make runor
$ qemu-system-i386 -fda build/main.img$ makebuild and run:
$ make buildRunrun qemu emulator with:
$ make debugor
$ qemu-system-i386 -fda build/main.img -s -Sin another window terminal run gdb:
$ gdbin gdb connect gdb to qemu:
(gdb) target remote localhost:1234
in gdb set breakpoint (at the start of the code address):
(gdb) br *0x7C00
To run:
- qemu emulator (qemu-system-i386).
To build:
- Nasm (to compile 16bits assembly files).
- Watcom 32bit compiler (to compile 16 bits C code).
- mkfs.fat (to create a FAT12 filesystem).
- mcopy.
- make.
Other:
- gdb (debugging).
Notes: I used "Watcom 32bit" because the 64bit failed to install on WSL ubuntu VM, the 32bit worked just fine.
This project was made and tested in side a Linux VM using (WSL with ubuntu image) on Win11. WSL version: 2.6.3.0 Ubuntu image: 24.0.04