Loading x16 PRos website...

x16 PRos

Minimalistic 16-bit operating system

About the Project

x16-PRos is a minimalistic 16-bit operating system written in NASM for x86 architecture. It features a command-line interface, FAT12 file system support, and a rich set of system calls for file operations, string manipulation, and output handling. The system runs in VGA mode (640x480, 16 colors) and supports a variety of built-in commands and programs.

x16 PRos system screenshot

System Lightweight

Occupies only 25.6 KB on disk, optimized for 1.44 MB floppy disks.

Extensibility

Supports loading custom 16-bit programs via the file system.

Educational

Ideal for learning OS development and low-level programming.

Rich API

Provides interrupt-driven APIs for output, file operations, and string manipulation.

x16 PRos v0.4 introduces a robust FAT12 file system, allowing users to list, load, write, delete, rename, and create files. The system supports commands for system information (CPU, time, date) and includes a melody at startup and shutdown.

Here's how to add a program to the disk image:

mcopy -i disk_img/x16pros.img PROGRAM.BIN ::/

Supported Commands in x16 PRos Terminal

x16 PRos v0.4 terminal supports a comprehensive set of commands:

  • help Display list of commands
  • info Show system information
  • ver Display terminal version
  • cls Clear the screen
  • shut Shut down the system
  • reboot Restart the system
  • date Display current date (DD/MM/YY)
  • time Show current time (HH:MM:SS, UTC)
  • cpu Display CPU information
  • dir List files on disk
  • cat <filename> Display file contents
  • del <filename> Delete a file
  • copy <filename1> <filename2> Copy a file
  • ren <filename1> <filename2> Rename a file
  • size <filename> Get file size
  • touch <filename> Create an empty file
  • write <filename> <text> Write text to a file

File System Features

x16 PRos v0.4 uses a FAT12 file system on a 1.44 MB floppy disk with the following features:

  • Capacity: 1.44 MB, with 224 root directory entries.
  • Filename Format: 8.3 format (e.g., FILENAME.TXT), case-insensitive.
  • Operations: Supports listing, loading, writing, deleting, renaming, and creating files.
  • Limitations: File sizes up to 32 KB; root directory limited to 224 entries.

x16 PRos Software Package

Basic x16 PRos software package includes:

  • Notepad For writing and saving texts to files
  • Brainf IDE For working with Brainf language
  • Barchart program For creating simple diagrams
  • Snake Classic Snake game
  • Calc Help with simple mathematical calculations
  • memory To view memory in real time
  • mine Classic minesweeper game
  • piano To play simple melodies using PC Speaker
  • space Space arcade games
  • procentages procentages calculator

Developer Documentation

Guide to developing programs for x16 PRos v0.4.

OS Architecture

Boot

The OS boots at address 0x07C0:0000 and loads the kernel (KERNEL.BIN) at 0x2000:0000.

Memory

  • User programs are loaded at address 0x0000:8000.
  • Buffers: dirlist (1024 bytes), file_buffer (32768 bytes).

Disk

  • Uses FAT12 file system on a 1.44 MB floppy disk (2880 sectors).

Program Development

Program Requirements

  • Format: 16-bit executable code written in NASM.
  • Organization: Use org 0x8000 directive.
  • Termination: Return control to the OS via:
    • int 0x19 - reboot (recommended).
    • ret - return to shell.

System Calls

x16 PRos v0.4 provides three interrupt-driven APIs:

Output API (INT 0x21)

  • AH=0x00: Initialize VGA mode (640x480, 16 colors).
  • AH=0x01–0x04: Print string in white, green, cyan, or red.
  • AH=0x05: Print newline.
  • AH=0x06: Clear screen.

File System API (INT 0x22)

  • AH=0x00: Initialize file system.
  • AH=0x01: Get comma-separated file list.
  • AH=0x02: Load file to memory.
  • AH=0x03: Write data to file.
  • AH=0x04: Check if file exists.
  • AH=0x05: Create empty file.
  • AH=0x06: Delete file.
  • AH=0x07: Rename file.
  • AH=0x08: Get file size.

String Operations API (INT 0x23)

  • AH=0x01: Get string length.
  • AH=0x02: Convert string to uppercase.
  • AH=0x03: Copy string.
  • AH=0x04: Remove leading/trailing spaces.
  • AH=0x05–0x06: Compare strings (with/without length limit).
  • AH=0x07: Tokenize string.
  • AH=0x08: Input string from keyboard.
  • AH=0x09: Clear screen.
  • AH=0x0A–0x0B: Get time/date string.
  • AH=0x0C: Convert BCD to integer.
  • AH=0x0D: Convert integer to string.
  • AH=0x0E–0x0F: Get/move cursor position.
  • AH=0x10: Parse string into tokens.

BIOS Interrupts

  • INT 0x10: Video services (set mode, cursor, character output).
  • INT 0x13: Disk operations (read/write sectors).
  • INT 0x16: Keyboard input.
  • INT 0x1A: Time/date services.

Minimal Program Example


[BITS 16]
[ORG 0x8000]

start:
    mov ah, 0x01    ; Print string in white
    mov si, hello_msg
    int 0x21
    
    mov ah, 0x00    ; Wait for key press
    int 0x16
    
    ret

hello_msg db 'Hello, x16 PRos!', 0

Limitations

  • No multitasking or memory protection.
  • File sizes limited to 32KB.
  • Root directory limited to 224 entries.
  • Maximum program size depends on available disk memory.
x16 PRos main screen

x16 PRos terminal

x16 PRos terminal

Writer program

Brainf interpreter

Barchart program

Snake game

Minesweeper game

Calculator program

Memory viewer

Piano program

Space arcade

Space arcade

Download

Run x16 PRos using emulators like QEMU or Bochs. Example QEMU command:

qemu-system-x86_64 -audiodev pa,id=snd0 -machine pcspk-audiodev=snd0 -hda x16pros.img

x16 PRos can run on real PCs with BIOS (not UEFI). For UEFI systems, enable CSM support in BIOS settings.

x16-PRos Developers

  • PRoX (Faddey Kabanov) Lead developer, creator of kernel, command interpreter, writer, brainf, snake.
  • Loxsete Developer of barchart program.
  • Saeta Developer of calculator program logic.
  • Qwez Developer of space arcade game.
  • Gabriel procentages calculator developer.

Contribute to the Project

Contribute to x16 PRos by:

Distributed under the MIT license. Feel free to use, modify, and distribute the code.

MIT License


Copyright © 2025 PRoX2011 (Faddey Kabanov)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files ("x16-PRos"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
                
× Note: We welcome contributions in documentation, sample programs, and tests.