x16-PRos Operating System

License Version Assembler Boot Mode

GitHub stars Last commit Contributions Welcome

A minimalistic 16-bit operating system written in NASM for x86 architecture

WebsiteAPI DocumentationConfigs Documentation


Overview

x16-PRos is a lightweight real-mode operating system designed for the x86 architecture and written entirely in NASM assembly. It features a command-line interface, supports the FAT12 file system, and includes a large standard software suite. This OS demonstrates fundamental operating system design principles, including booting, file system management, interrupt handling, and hardware interaction.

Designed for simplicity and educational value, x16-PRos provides a platform for low-level programming enthusiasts to explore bare-metal development on x86 systems.

[!IMPORTANT] The project needs contributors. Now only I, PRoX2011, is working on the kernel, but I can’t do everything alone. I would like to ask you how to help the project.

  • Programs
  • Development of a compatibility layer with MS DOS
  • Improved documentation and instructions

If you help - thank you so much



Developing this project requires a lot of time and effort. The project is completely open source. Everything is being done out of pure passion, so if you like it, I'd like to ask you to support me (PRoX2011) financially using this link: support me

Thanks to everyone who supported me financially. All your nicknames will appear in the project's sponsors list.


Key Features

  • MS-DOS Compatibility: Native support for running standard MS-DOS .COM and .EXE executables.
  • Encrypted Password System: XOR-based password encryption with custom key
  • User Authentication: Login system with configurable user account
  • Password Protection: Encrypted PASSWORD.CFG prevents plaintext password storage
  • Customizable Prompts: User-defined command prompt via PROMPT.CFG
  • Username Support: Personalized user sessions stored in USER.CFG
  • Color Themes: Multiple color palettes (DEFAULT, GROOVYBOX, UBUNTU) and fully customizable THEME.CFG if 3 standard themes are not enough for you
  • First-Boot Setup: Automated SETUP.BIN execution on initial startup
  • Auto-Execution: AUTOEXEC.BIN support for startup scripts
  • Mouse Driver: Full PS/2 and USB mouse support
  • Directory Support: Create, delete, and navigate directories (MKDIR, DELDIR, CD)
  • File Management: Complete CRUD operations on files
  • File Operations: COPY, REN, DEL, TOUCH, WRITE commands
  • File Inspection: CAT, SIZE, HEAD, TAIL, GREP utilities
  • BMP Image Viewer: 256-color BMP rendering with 2x upscaling support
  • Parameter Passing: Command-line argument support for applications
  • API Access: Comprehensive kernel API for file, disk, time and output operations
  • Debugging Tools: CPU info display, memory viewer, register inspection
  • Multiple disk support: detect/list available drives and switch drives in the terminal
  • cp866 fonts support: change system font using config or TUI application
  • Timezones support: change your time zone via TIMEZONE.CFG
  • AND MUCH MORE FEATURES

🖥️ PRos Terminal

The system includes a powerful terminal - PRos Terminal. It not only allows you to launch programs but also offers a wide range of built-in commands and utilities.

[!NOTE] To run a program, enter the name of the executable file (.BIN or .COM) with or without an extension. Programs will be launched from any directory if its file is placed in the BIN/ directory, and if the program file is not found there, the system will try to find the program in the current, working directory


Basic Commands

CommandDescription
helpDisplay categorized command reference with navigation
infoShow system information and OS details
clsClear terminal screen
verDisplay PRos terminal version
exitExit to bootloader

System Information

CommandDescription
cpuDisplay detailed CPU information (family, model, cores, cache)
dateShow current date (DD/MM/YY format)
timeShow current time (HH:MM:SS format, UTC)

File Operations

CommandSyntaxDescription
dirdirList files in current directory with size info
catcat <filename>Display file contents
sizesize <filename>Show file size in bytes
deldel <filename>Delete a file (kernel.bin protected)
copycopy <source> <dest>Copy file (root directory only)
renren <old> <new>Rename file (root directory only)
touchtouch <filename>Create empty file
writewrite <file> <text>Write text to file

Directory Operations

CommandSyntaxDescription
cdcd <dirname>Change directory (use .. for parent, / for root)
mkdirmkdir <dirname>Create new directory
deldirdeldir <dirname>Delete empty directory

Media & Display

CommandSyntaxDescription
viewview <file> [-upscale] [-stretch]Display BMP image with optional 2x scaling

Power Management

CommandDescription
shutShutdown system via APM
rebootRestart system

📦 Standard Software Package

x16-PRos includes a comprehensive collection of built-in applications:


WRITER.BIN
Simple editor for text files

HEXEDIT.BIN
Hex editor

LAUNCH.BIN
TUI program launcher

MINE.BIN
Minesweeper game

PIANO.BIN
Simple piano to play melodies using PC Speaker

BCHART.BIN
Barchart software for creating simple diagrams

SPACE.BIN
Space arcade game

CALC.BIN
Simple calculator

MEMORY.BIN
Memory viewer

PAINT.BIN
Paint program

PONG.BIN
Pong game

FETCH.BIN
Print system fetch (I use PRos btw)

IMFPLAY.BIN
IMF music player

CLOCK.BIN
Clock application

PROCENTC.BIN
Percentages calculator

TETRIS.BIN
Tetris game

MANDEL.BIN
Mandelbrot-Menge

BRAINF.BIN
Brainfuck interpreter

SETTINGS.BIN
x16-PRos system settings

And more...
SNAKE.BIN, CREDITS.BIN, AUTOEXEC.BIN, GREP.BIN, HEAD, TAIL, THEME.BIN, CHARS.BIN, WAVPLAY.BIN, FDISK.BIN, ED.BIN, HELLO.COM, FRACTAL.COM, CALENDAR.BIN

Developing Your Own Programs

You can create custom programs using NASM and the PRos API.


🛠️ Building from Source

Packages required for compilation

  • NASM
  • mtools
  • dosfstools
  • cdrtools (optional for OS ISO image)

Installing packages:

Ubuntu/Debian
sudo apt install nasm mtools dosfstools genisoimage

[!NOTE] cdrtools (including the original mkisofs) is not included in the official Debian/Ubuntu repositories due to licensing issues. Genisoimage (a fork that provides compatibility with mkisofs via symlink) is used instead.

Arch Linux / Manjaro
sudo pacman -Syu nasm mtools dosfstools cdrtools

[!NOTE] Arch has a native cdrtools package available, which provides mkisofs.

Fedora / CentOS
sudo dnf install nasm mtools dosfstools genisoimage

Compilation Steps

  1. Clone the repository:
git clone https://github.com/PRoX2011/x16-PRos.git
cd x16-PRos
  1. Make build script executable:
chmod +x build-linux.sh
  1. Build the project:
./build-linux.sh

[!NOTE] FOR ADVANSED USERS build-linux have special flags:

-quiet            - disable all script messages, but not disable nasm's warnings and errors
-no-music         - do not add music files in system build
-no-txt           - do not add text files in system build
-no-boot-recomp   - do not compiling bootloader, in system build using old compiled bootloader from bin/ directory
-no-kernel-recomp - do not compiling kernel, in system build using old compiled kernel from bin/ directory
-dtm              - disable setup on first boot. dev testing mode.

Build Output

  • disk_img/x16pros.img - Bootable floppy disk image (1.44MB)
  • build/ - Compiled binaries and intermediate files

🚀 Running x16-PRos

QEMU (Recommended)

Install QEMU:

Debian/Ubuntu
sudo apt install qemu-system-x86
ArchLinux/Manjaro
sudo pacman -S qemu-system-x86
Fedora
sudo dnf install qemu-system-x86

Run with QEMU

Run using a command:
qemu-system-x86_64 \
    -display gtk \
    -fda disk_img/x16pros.img \
    -machine pcspk-audiodev=snd0 \
    -device adlib,audiodev=snd0 \
    -audiodev pa,id=snd0
Run using a script (recommended):
chmod +x run-linux.sh
./run-linux.sh

Online Emulation

Try x16-PRos in your browser using v86 emulator:

  1. Upload x16pros.img as floppy or hard disk
  2. Boot the system

Real Hardware

  1. Write image to USB drive:
sudo dd if=disk_img/x16pros.img of=/dev/sdX bs=512
  1. Boot from USB drive (BIOS mode)

UEFI Systems: Enable "CSM Support" or "Legacy Boot" in BIOS settings

[!NOTE] More detailed launch instructions are available on the project website: https://x16-pros.prosdev.org/


Contributors

leo-ono akbe2020 ilnarildarovuch2 dexoron realtomokokuroki leo-ono

We welcome contributions! Special thanks to all who have submitted:

  • Bug reports and fixes
  • Documentation improvements
  • Feature suggestions
  • Program development

🤝 Contributing

How to Contribute

  1. Report Bugs: Open an issue on GitHub Issues
  2. Submit Code: Fork, develop, and create pull requests
  3. Write Programs: Develop applications using the PRos API
  4. Improve Docs: Email suggestions to prox.dev.code@gmail.com

More about contributing: contributing guide

[!IMPORTANT] Please use English when commenting on code and describing changes. This project is designed to be multinational and accessible to everyone.

Development Guidelines

  • Follow existing code style (NASM assembly conventions)
  • Test changes in QEMU before submitting
  • Document new features in comments
  • Update README.md for user-facing changes

Made with ❤️ by PRoX