Skip to the content.

FreeDOS MicroPython Manual

Python 3 for FreeDOS / i386 — a fully-functional interactive Python REPL, a real import-driven module system, and an honest networking stack (TCP / TLS / SSH / SCP / SFTP) that runs on a 1990s-era PC.

MicroPython uc386-triage on 2026-05-01; uc386-dos with i386
Type "help()" for more information.
>>> def fib(n):
...     if n < 2: return n
...     return fib(n-1) + fib(n-2)
...
>>> print([fib(i) for i in range(10)])
[0, 1, 1, 2, 3, 5, 8, 13, 21, 34]
>>>

This site is the user manual. The source repository lives at https://github.com/avwohl/freedos_micro_python.

If you want the developer/build-history notes instead, see WIP.md in the same directory.


Where to start

If you’ve never run MicroPython on DOS before, read these in order:

  1. What is MicroPython? — one-page tour of the language subset, what’s different from desktop CPython, and where DOS constraints show through.
  2. Getting started — getting MP.EXE onto a FreeDOS system (real hardware, QEMU, DOSBox-X, dosiz) and running your first script.
  3. Using the REPL — the interactive prompt, paste mode, keyboard shortcuts, how to run scripts and import your own .py files.

Manual contents

Language

Standard library

Core:

Numerics + data:

Networking + crypto:

Concurrency:

DOS-specific

Bundled tools

The port ships three pure-MicroPython programs that run end-to-end on DOS — drop them into a floppy image and they work as standalone utilities.

Practical


What works, what doesn’t

The feature matrix at the bottom of the repo README is the authoritative answer.

The short version: the language is real Python 3. Comprehensions, generators, classes, exceptions, decorators, yield from, f-strings, keyword-only args, *args / **kwargs, async/await — everything you’d expect from a modern Python.

What’s missing is mostly hardware-specific or RTOS-specific upstream modules (_thread, network.WLAN, machine.Pin/I2C/SPI, bluetooth, btree, …) that have no DOS analogue, plus a few we just haven’t needed yet (cmath, weakref).


Credits

Big chunks of this manual are adapted from the official MicroPython documentation (MIT-licensed, Copyright © 2014-2024 Damien P. George and contributors) and the CPython documentation (PSF-licensed, Copyright © 2001-2024 Python Software Foundation). Where a description, table, or example came over largely verbatim we’ve left it in place and credited the source on the page footer; where we needed to adapt for DOS, the wording is ours.

The complete list of third-party software bundled or fetched at build time — MicroPython itself, axtls (TLS), libssh2 (SSH), TweetNaCl (Curve25519 / Ed25519), lwIP (TCP/IP), crypto-algorithms (SHA), PMODE/W (DOS extender), FreeDOS — is in docs/THIRD_PARTY.md in the repo.