- Boots with grub in qemu or USB flash
- Printing
- Input string (supports Shift, BackSpace, Enter, Esc without interrupts)
- Precise nanosleep using PIT (without interrupts)
- Move cursor
- Pseudo random number generator
- Shows CPU vendor string
- Shows date and time (updates every second)
- Shows asynchronous real-time random colorful animation with fixed speed
The idea behind nanosleep implementation: read PIT counter and calculate number of ticks that happened after the previous read. This results in precise delay, but as interrupt handling is not used, CPU cannot do other work. In this case there is no other work, so it is ok. In real world you should better implement interrupt handlers.
Based on this tutorial by CodePulse, XV6 and this project.
Build image for docker env:
docker build buildenv -t magickos-buildenv
- Linux or MacOS:
docker run --rm -it -v "$pwd":/root/env magickos-buildenv - Windows (cmd):
docker run --rm -it -v "%cd%":/root/env magickos-buildenv - Windows (Powershell):
docker run --rm -it -v "${pwd}:/root/env" magickos-buildenv
Build for x86:
make build-x86_64
to leave the build environment type exit
Emulate Magick-OS using Qemu
qemu-system-x86_64 -cdrom dist/x86_64/kernel.iso
use this one if you have added to path and the previous doesn't work
"C:\Program Files\qemu\qemu-system-x86_64.exe" -cdrom dist/x86_64/kernel.iso
First open real Command Prompt (do not use Far or anything else). Then go to your local folder, where os-series is:
cd x:\app\os-series
x:
docker run --rm -it -v "%cd%":/root/env myos-buildenv
make build-x86_64
Now dist/x86_64/ will contain kernel.iso file
Insert USB flash drive
Download Rufus