Skip to content

Antonako1/atOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

668 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

atOS — a 32-bit Operating System

Build License Status

⚠️ atOS is in early development

A custom 32-bit operating system written in C and Assembly.
Boots from an ISO or FAT and runs as a raw binary.
Intentionally built without modern security constraints to encourage deep low-level learning, experimentation, and hacking. As of now, atOS includes shell, TUI and GUI libraries, assembler/dissasembler, and multitasking support.


Preview

atOS Preview atOS Graphics Preview atOS Kernel Panic


Table of Contents


Overview

atOS is a from-scratch 32-bit x86 operating system crafted in C and Assembly. The project is geared toward systems programmers, students, and OS enthusiasts who want to explore how operating systems work at the hardware/software boundary.

Unlike modern operating systems, atOS removes safety restrictions, giving developers complete control and transparency into memory, hardware, and execution.

This makes atOS ideal for learning, experimentation, and low-level programming without the abstractions and protections of contemporary OSes.

TL;DR: atOS is a simple, open-source 32-bit Ring0 operating system designed for educational purposes and low-level exploration.


Features

  • 🖥️ 32-bit x86 Architecture — runs on legacy and virtualized hardware.
  • 🛠️ Assembler and dissasembler (Compiler WIP) — integrated experimental assembler and disassembler for low-level programming.
  • 🔓 No Safety Barriers — Ring 0, no protection layers or user/kernel enforcement, making it ideal for exploration.
  • 🗄️ File System Support — ISO9660 for CD-ROM images and FAT32 for local storage.
  • 🖥️ Graphics & UI — VBE-based graphics with custom ATGL and ATUI libraries. Examples are SANDBOX.BIN, PAINT.BIN and JOT.BIN
  • 🧩 Modular Driver Stack — support for RTL8139 (Ethernet), AC97 (Audio), PS/2 (Keyboard/Mouse), Serial ports and more!
  • 🐢 Multitasking — simple cooperative scheduler for handling multiple processes.
  • 🐚 Shell Environment — a feature-rich command-line shell with environment variables and BATSH shell language for scripting.
  • 🎮 System Programs — suite of utilities including ASTRAC (compiler), PAINT, CLOCK, JOT (text editor), and games like PONG.
  • 📖 Open Source — licensed under MIT, designed as a learning tool for systems programming.

Running atOS

You can run atOS from the provided ISO in a virtual machine.
QEMU is the recommended environment, others aren't guaranteed to work.

System Requirements

Resource Recommended
RAM 1024 MB
CPU 1 Core
HDD over 256 MB

Install QEMU (Debian/Ubuntu)

sudo apt install qemu-system-x86

Install QEMU (Windows)

Download from the official QEMU website and follow the installation instructions, or use WSL with the Linux instructions above.

Booting atOS with QEMU

  # Creates a hard disk image.
	qemu-img create -f raw hdd.img 256M   
  # Creates folder for the debug.log
	mkdir -p OUTPUT/DEBUG
 # Creates your hard disk image
	qemu-img create -f raw hdd.img 256M
 
 # Runs the ISO file
	qemu-system-i386 -vga std \
	-m 1024 \
	-boot order=d \
	-cdrom $(OUTPUT_ISO_DIR)/$(ISO_NAME) \
	-drive id=cdrom,file=$(OUTPUT_ISO_DIR)/$(ISO_NAME),format=raw,if=none \
	-drive id=hd0,file=hdd.img,format=raw,if=none \
	-device piix3-ide,id=ide \
	-device ide-hd,drive=hd0,bus=ide.0 \
	-device ide-cd,drive=cdrom,bus=ide.1 \
	-device ac97,audiodev=snd0 \
	-debugcon file:OUTPUT/DEBUG/debug.log \
		-global isa-debugcon.iobase=0xe9 \
		-audiodev sdl,id=snd0 \
		-nic user,model=rtl8139,mac=52:54:00:12:34:56 \

Development

Want to dig into the source or contribute? Here’s how to set up the environment.

Dependencies

Install the essential build tools:

# For Debian/Ubuntu
sudo apt install qemu-system-x86 nasm make gcc genisoimage cmake ninja-build

Tools used in development:

Tool Version Purpose
QEMU 8.2.2 Virtualization and testing
NASM 2.16 Assembler for x86 assembly code
Make 4.3 Build automation
GCC 13.3.0 C compiler for building tools and libraries
Genisoimage 1.1.11 Create ISO images for booting
CMake 3.28.3 Build system generator for libraries and tools
Ninja 1.11.1 Fast build system

Building

The project uses make with simple targets:

  • Show all available commands:

    make help
  • Build and launch atOS:

    make iso run

CMake is used for processes and libraries

Debugging

Debugging support is minimal. Please see DOCS/DEBUGGING.md for options and tips. QEMU writes a debug log to:

  • OUTPUT/DEBUG/debug.log (port 0xE9 debugcon)

Use SOURCE/STD/DEBUG.h or SOURCE/KERNEL/32RTOSKRNL/DEBUG/KDEBUG.h


Project Roadmap

Planned and in-progress features for atOS:

  • ATUI & ATGL UI/Graphics Libraries
  • BATSH Scripting Language
  • Text Editor (JOT)
  • Dynamic Library Loading
  • Assembler / Disassembler
  • C Compiler implementation
  • Improved ACPI & Power Management
  • Network Stack refinement (TCP/IP)

This roadmap is tentative and may evolve as the project grows.


Documentation

Additional documentation is located in the DOCS/ folder, as well as inline within source directories and headers and in README files found inside each directory!


License

This project is licensed under the MIT License. See the LICENSE file for details.

Credits

  • CREDITS file for a full list of credits and acknowledgments.