😇 Although it worked properly on my old laptop and desktop pc.
All operating systems, including Windows
- NASM assembler (nasm)
- LLVM toolchain (clang, llvm-objcopy, ld.lld)
- QEMU emulator (qemu-system-i386)
Make sure all tools available from PATH
cd src
nasm -Werror -f elf32 -o ../build/bootloader.o bootloader.s
cd ../build
clang --target=i686-pc-none-elf -c -o kmain.o ../src/kmain.c
ld.lld -T linker.ld
llvm-objcopy --set-start=0x7c00 -O binary kernel.o kernel.bin
qemu-system-i386 -drive file=kernel.bin,format=raw
To jump to C code uncomment line 138 in bootloader.s