This is my preset when making a new operating system from scratch.
Before jumping into the code, please read the full documentation page to get a full understanding of this preset project, thank you!
- 2x Output functions: sysout_line, sysout
- Basic scrolling system - when all the lines are filled with information,
the kernel deletes the first line and moves the rest of lines one line up
/output_files/
<- location of the compiled files
/includes/colors/
<- files which include variables with color values
/includes/global/
<- global variables like next possible line/column the kernel can use to print something to the screen,..
/compiler.py
<- compiler program ( so far i don't have experience with making a Makefile )
/kernel.c
<- the kernel written in c code
/bootloader.asm
<- bootloader
/linker.ld
<- linker script
/output_files/system
<- once compiled the code with the compiler, this is the operating system file
It is as simple as just typing:
python3 compiler.py
<- supposing you have already installed nasm, gcc, ld, qemu-system-x86_64 and qemu-system-i386
!If you want to compile it and run the kernel at the same time type:
python3 compiler.py compile-run
<- supposing you have installed qemu-system-x86_64 and qemu-system-i386
- Move into the
/output_files
directory withcd ./output_files
- Run the qemu-system-i386 program on the outputted file ("system")
qemu-system-i386 -kernel system