SimpleOS - A Lightweight x86 Operating System, this is the product that is allowing for the development of the Edge Based Agentic OS, the link for it is given above. Architecture for the edge based agentic OS is as follows:
LINK FOR THE EDGE DEVICE BASED AGENTIC OS:- https://github.com/Aditya-B-007/SimpleOS-Edge-Agentic-OS
SimpleOS is a lightweight, robust operating system for the x86 architecture, written in C and Assembly. It provides a foundational set of OS features, including protected mode, memory segmentation, and a full interrupt handling system, making it ideal for embedded applications, legacy system revival, or as a base for custom OS development.
- Bootloader: Custom 16-bit bootloader that transitions to protected mode
- GDT (Global Descriptor Table): Memory segmentation with kernel/user segments
- IDT (Interrupt Descriptor Table): Complete interrupt handling system with exception messages
- VGA Text Driver: Full-featured text output with scrolling, colors, and formatting
- Keyboard Driver: PS/2 keyboard support with scan code translation
- Interactive Shell: Command-line interface with built-in commands
- Memory Management: Basic protected mode memory setup
- Interrupt Handling: Proper CPU exception and hardware interrupt handling
- Real Mode Boot: 16-bit bootloader loads from sector 0
- A20 Line: Enable extended memory access
- Protected Mode: Switch to 32-bit protected mode
- Kernel Entry: Jump to kernel main function
- Text mode output at 0xB8000
- 80x25 character display
- 16-color palette support
- Automatic scrolling
- Hex/decimal number formatting
- 5-entry descriptor table (null, kernel code/data, user code/data)
- Proper segment reloading
- 4GB flat memory model
- 256 interrupt descriptors
- Exception handlers with descriptive messages
- Hardware interrupt support (PIC reprogramming)
- Assembly interrupt stubs (
interrupt.asm)
- PS/2 keyboard interrupt handler (IRQ1)
- Scan code to ASCII translation
- Shift and Caps Lock support
- Key buffer for input queuing
- Integration with shell interface
- Command-line interface
- Built-in commands: help, clear, about, reboot, halt
- Command history and input processing
- Backspace support and line editing
- System initialization sequence
- Colorized boot messages
- Shell initialization and main loop
You need a cross-compilation toolchain for i686-elf:
i686-elf-gcc(C compiler)i686-elf-ld(Linker)nasm(Netwide Assembler)
sudo apt-get install build-essential nasm qemu-system-x86
# For the cross-compiler, you can build it from source.
# A good guide can be found here: https://wiki.osdev.org/GCC_Cross-Compiler
# Alternatively, some package managers might have pre-built toolchains.- Install MSYS2
- Install cross-compilation tools:
pacman -S mingw-w64-i686-gcc nasmmake all # Build OS image
make clean # Remove build files
make qemu # Run with QEMU (if installed)
make bochs # Run with Bochs (if installed)
make help # Show available targetsqemu-system-i386 -fda build/os.imgbochs -f bochsrc.txt- Create new VM with floppy disk
- Mount
build/os.imgas floppy image - Boot from floppy
Once the system boots, you'll see the SimpleOS shell prompt:
SimpleOS>
The agent will process your request and respond accordingly.
> what time is it?> create a new file named notes.txt> tell me about the CPU> reboot the machine in 5 minutes
SimpleOS/
├── boot/
│ └── boot.asm # 16-bit bootloader
├── kernel/
│ ├── kernel.c # Kernel main and initialization
│ ├── gdt.c/.h # Global Descriptor Table
│ ├── idt.c/.h # Interrupt Descriptor Table
│ ├── vga.c/.h # VGA text driver
│ ├── keyboard.c/.h # PS/2 keyboard driver
│ ├── agent.c/.h # The core AI agent logic
│ └── interrupt.asm # Assembly interrupt handlers
├── build/ # Build output (auto-generated)
├── Makefile # Build configuration
├── linker.ld # Linker script
└── README.md # This file
- 0x00007C00: Bootloader load address
- 0x00100000: Kernel load address (1MB)
- 0x000B8000: VGA text buffer
- 0x00090000: Stack pointer
- ISR 0-31: CPU exceptions (division error, page fault, etc.)
- IRQ 0-15: Hardware interrupts (timer, keyboard, etc.)
- PIC Remapping: Master PIC (0x20-0x27), Slave PIC (0x28-0x2F)
- 0=Black, 1=Blue, 2=Green, 3=Cyan, 4=Red, 5=Magenta
- 6=Brown, 7=Light Grey, 8=Dark Grey, 9=Light Blue
- 10=Light Green, 11=Light Cyan, 12=Light Red
- 13=Light Magenta, 14=Light Brown, 15=White
Future development is focused on expanding the kernel's capabilities. Key areas on our roadmap include:
- Agent Tooling: Expanding the set of kernel functions (tools) the LLM agent can use.
- Long-Term Memory: Implementing a file system to give the agent persistent memory.
- Multitasking: Allowing the agent to manage and execute multiple background processes.
- Connect GDB:
gdb -ex "target remote :1234" - Enable QEMU monitor: Add
-monitor stdio
SimpleOS is an open-source product and we welcome contributions from the community. If you are interested in contributing, please feel free to fork the repository, make your changes, and submit a pull request. We are actively looking for improvements in drivers, memory management, and performance optimizations.
This product is released under the MIT License. See the LICENSE file for details.
-
OSDev Wiki - Comprehensive OS development resource