About the Project
x16-PRos is a minimalistic 16-bit operating system written in NASM for x86 architecture. It supports a text interface, loading programs from disk, and basic system functions such as displaying CPU information, time, and date.
System Lightweight
x16-PRos is a lightweight system. On disk, it takes up only 25.6 kilobytes.
Extensibility
Ability to add your own 16-bit programs.
Educational
Great project for learning the principles of operating systems.
Understandability
All programs have convenient hints that will definitely help you understand everything.
x16 PRos includes a small set of built-in programs. You can add your own program to the system image and then run it using the load command, specifying the disk sector number where you wrote the program as an argument.
Here's how you can add a program:
dd if=YourProgram.bin of=disk_img/x16pros.img bs=512 seek=DiskSector conv=notrunc× Warning! Do not write the program to sectors 1 through 9. The system itself is located there.
× Pay attention to the build file It shows which sectors are occupied by programs.
When trying to load sectors 1 through 9 using load, you will encounter artifacts or system freezes.
Supported commands in x16 PRos terminal
Basic set of x16 PRos terminal commands:
- help display list of commands
- info brief system information
- cls clear screen
- shut shut down the system
- reboot restart the system
- date display date
- time show time (UTC)
- CPU CPU information
- disk-i disk information
- load load program from disk sector (0000x800h)
- writer start writer program
- brainf start brainf interpreter
- barchart start barchart program
- snake start Snake game
- calc start calculator program
- disk-tools start disk-tools program
- BASIC start micro-BASIC interpreter
- memory start memory viwer program
- mine start cminesweeper game
- piano start piano program
- space start space arcade game
x16 PRos Software Package
Basic x16 PRos software package includes:
- Notepad for writing and saving texts to disk sectors
- Brainf IDE for working with Brainf language
- Barchart program for creating simple diagrams
- Snake classic Snake game
- Calc help with simple mathematical calculations
- disk-tools to erase programs from disk sectors
- BASIC Micro-BASIC programming language interpreter
- memory to view memory in real time
- mine classic minesweeper game
- piano to play imple melodies using PC Speaker
- space space arcade games
Developer Documentation
Quick guide to developing programs for x16 PRos.
OS Architecture
Boot
The OS boots at address 0000x500h (500h in hexadecimal)
Memory
- User programs are loaded at address 0000x800h
Disk
- 50 sectors are used
- Programs are distributed across predefined sectors (see build-linux.sh)
Program Development
Program Requirements
- Format: The program must be 16-bit executable code written in NASM
- Organization: Use the org 800h directive
- Termination: The program should return control to the OS in one of the following ways:
- int 0x19 - reboot (highly recommended)
- jmp 500h - return to shell
Available System Calls
Video Service (int 0x10)
- AH=0x00 - set video mode
- AH=0x02 - set cursor position
- AH=0x0E - output character
Keyboard Input (int 0x16)
- AH=0x00 - read character with wait
Disk Operations (int 0x13)
- AH=0x02 - read sector
- AH=0x03 - write sector
And other BIOS interrupts.
Minimal Program Example
[BITS 16] [ORG 800h] ; For user programs start: ; Clear screen mov ax, 0x03 int 0x10 ; Display message mov si, hello_msg call print_string ; Wait for key press mov ah, 0x00 int 0x16 ; Terminate program int 0x19 print_string: mov ah, 0x0E mov bh, 0x00 mov bl, 0x0F .print_char: lodsb cmp al, 0 je .done int 0x10 jmp .print_char .done: ret hello_msg db 'Hello, x16 PRos!', 0Limitations
- No multitasking support
- No memory protection
- Limited set of system calls
- Maximum program size - several sectors (can be increased in build-linux)
Download
To run x16 PRos, use emulators such as QEMU or Bochs. Example command for QEMU:
qemu-system-x86_64 -audiodev pa,id=snd0 -machine pcspk-audiodev=snd0 -hda x16pros.imgYou can also try running x16-PRos on a real PC (preferably with BIOS, not UEFI)
If you still want to run x16-PRos on a UEFI PC, you will need to enable "CSM support" in your BIOS. It may be called slightly differently.
x16-PRos Developers
- PRoX (Faddey Kabanov) lead developer. Creator of the kernel, command interpreter, writer, brainf, snake programs.
- Loxsete developer of the barchart program.
- Saeta developer of the calculation logic in the program "Calculator".
- Qwez space arcade game developer.
Contribute to the Project
If you want to contribute to the development of x16 PRos, you can:
- Report bugs via GitHub Issues.
- Suggest improvements or new features on GitHub.
- Help with documentation by emailing us at [email protected].
- Develop new programs for the system.
The project is distributed under the MIT license. You are 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 especially welcome contributions in the form of documentation, sample programs and tests.