FzKernel is a minimal 32-bit operating system kernel written in C and Assembly for the x86 architecture. This is an updated version of the project, featuring an interactive shell (fzsh), keyboard input, real-time clock (RTC) support, a basic text editor, and interrupt handling.
- Interactive Shell (
fzsh): Supports commands likehelp,clear,about,halt,edit,links,rtc. - VGA Text Mode: Text output with color support and screen scrolling.
- Keyboard Handling: Supports shift, caps lock, and basic input via IRQ1.
- Real-Time Clock (RTC): Displays current time and date.
- Programmable Interval Timer (PIT): Implements
sleepfunction for delays. - Interrupt Management: Configures IDT and PIC for IRQ0 (timer) and IRQ1 (keyboard).
- Basic Text Editor: Simple editor for text input (via
editcommand). - Open Source: Source code available on GitHub.
To build and run FzKernel, ensure the following tools are installed:
- 🛠️
gcc(C compiler, version 4.8 or higher) - 🛠️
ld(GNU linker) - 🛠️
nasm(Netwide Assembler) - 🛠️
qemu-system-x86_64(emulator for running the kernel)
Verify your setup:
gcc --version
ld --version
nasm -v
qemu-system-x86_64 --version- Clone repo
git clone https://github.com/flartiks/FzKernel.git
cd FzKernel- Build kernel
make- Run kernel
make runkernelAfter booting the kernel, you will enter the fzsh shell. Available commands:
help— Display the list of commands.clear— Clear the screen.about— Show information about FzKernel.halt— Halt the system.edit— Launch the text editor.links— Display the GitHub repository link.rtc— Show the current time and date.
- Architecture: x86 (32-bit protected mode).
- Bootloader: Multiboot-compatible (GRUB).
- Components:
- Graphics: VGA text mode (80x25, 16 colors).
- Interrupts: PIC and IDT setup for IRQ0 (PIT) and IRQ1 (keyboard).
- Timer: PIT configured at 100 Hz.
- I/O: Direct port access (0x60, 0x70, 0x71, etc.).
- Build: Uses
gccwith-m32,nasmwith-f elf32, andldwith a customlinker.ldscript.
- Add functionality for "edit".
- Implement file system support.
- Add commands for displaying system information (memory, CPU state).
- Explore transition to x86_64 (64-bit mode).
FzKernel is distributed under the Apache License 2.0. See the LICENSE file for details.