Skip to content

PY-DOS is a retro-inspired, terminal-based operating system simulation written entirely in Python, requiring no external libraries and designed to be minimal.

License

Notifications You must be signed in to change notification settings

EgeOnderX/PY-DOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 

Repository files navigation

This product is no longer supported. Please take a closer look at: https://github.com/EgeOnderX/PY-DOS-on-ESP32

PY-DOS 1.0.3

PY-DOS is a retro-inspired, terminal-based operating system simulation written entirely in Python.

It recreates the classic DOS experience while providing an educational and expandable platform for learning file systems, memory management, and command-line interfaces.

Developed from scratch by Ege
Licensed under the MIT License


Features

  • Virtual RAM and Disk system (ram.py, disk.py)
  • JSON-based disk storage (simulating 512 MB)
  • File & folder commands: MKDIR, CD, TREE, COPY, RENAME, etc.
  • CPU and RAM simulation with basic cycle tracking (cpu.py, ram.py)
  • Command-line interface with keyboard input
  • Modular and expandable code structure
  • AMS (Anti-Malware Service) for scanning RAM and Disk
  • Application run system (RUN <file> command)

What's New?

  • Added helpall command for more detailed information.
  • Introduced a protection counter against loop viruses.
  • Implemented a new AMS logging system.
  • Added a lightweight edit application.
  • Reduced overall size through optimizations.
  • Added real time protection.

Technical Details

  • PY-DOS uses a 128 MB RAM simulation and a 512 MB virtual disk (disk.json)
  • The disk is JSON-based and saves automatically after a REBOOT
  • Use RAMLOAD for temporary RAM storage; commit to disk with REBOOT
  • Anti-Malware Service scans for suspicious content, e.g., format commands
  • All data is saved between sessions through disk.json
  • Cross-platform: Works on Windows, Linux, and macOS
  • Removed the requirement to define separate commands for both run and cmd.

How to Write Your Own Program in PY-DOS

In PY-DOS, you can write simple applications directly in the terminal using the WRITE command.
The format is:

write utf8

  • <filename>: Name of your application file.
  • utf8: Indicates the file contains executable terminal code.
  • <your code here>: The commands your application will execute when run.

Example

write myapp utf8 print Hello, World!; print Welcome to PY-DOS

  • This creates a file called myapp.
  • When you run it with RUN myapp, it will execute the commands:

'print Hello, World!' 'print Welcome to PY-DOS'

Running Your Application

'run myapp'

NOTES

  • The terminal executes all commands in sequence.
  • You can include multiple commands separated by semicolons (;).
  • Supported commands are the same as in the terminal, e.g., PRINT, WRITE, DEL, REBOOT, etc.

Requirements

  • Python 3.8 or later

Screenshots

Run program system

image

AMS

image

AMS

image

ams


All Commands

  • DIR - List files and directories
  • TREE - Display directory tree
  • TYPE - Show file content
  • WRITE - Write text to a file (RAM+Disk)
  • DEL - Delete a file from RAM and Disk
  • RENAME - Rename a file
  • COPY - Copy a file
  • MKDIR - Create a new directory
  • CD / CCD - Change current directory
  • RUN - Run a script or application
  • SAVE - Save RAM contents to Disk
  • RAMLOAD - Load a key-value into RAM
  • RAMCLEAR - Clear all RAM contents
  • RAMSHOW - Display RAM contents
  • SYSINFO - Display system information
  • REBOOT - Save RAM to disk and reboot the system
  • FORMAT - Format (reset) the disk
  • PRINT - Print text to screen
  • CLEARCPU - Reset CPU cycles to 0
  • AMS - Run Anti-Malware Scan (RAM & Disk)
  • HELP - Display all available commands
  • EXIT - Exit PY-DOS

About

PY-DOS is a retro-inspired, terminal-based operating system simulation written entirely in Python, requiring no external libraries and designed to be minimal.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages