Skip to content

PRoX2011/x16-PRos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

204 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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

Website โ€ข API Documentation โ€ข Configs 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



Stargazers over time


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 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

๐Ÿ–ฅ๏ธ 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

Command Description
help Display categorized command reference with navigation
info Show system information and OS details
cls Clear terminal screen
ver Display PRos terminal version
exit Exit to bootloader

System Information

Command Description
cpu Display detailed CPU information (family, model, cores, cache)
date Show current date (DD/MM/YY format)
time Show current time (HH:MM:SS format, UTC)

File Operations

Command Syntax Description
dir dir List files in current directory with size info
cat cat <filename> Display file contents
size size <filename> Show file size in bytes
del del <filename> Delete a file (kernel.bin protected)
copy copy <source> <dest> Copy file (root directory only)
ren ren <old> <new> Rename file (root directory only)
touch touch <filename> Create empty file
write write <file> <text> Write text to file

Directory Operations

Command Syntax Description
cd cd <dirname> Change directory (use .. for parent, / for root)
mkdir mkdir <dirname> Create new directory
deldir deldir <dirname> Delete empty directory

Media & Display

Command Syntax Description
view view <file> [-upscale] [-stretch] Display BMP image with optional 2x scaling

Power Management

Command Description
shut Shutdown system via APM
reboot Restart 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

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

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

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

About

Simple 16 bit (real mode) operating system writen in NASM from scratch

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors