Development Plan: Porting Python to PDP-10
Overview
- Objective: Enable execution of Python code on PDP-10 systems.
- Challenges: 36-bit architecture, no POSIX, limited memory, non-standard word size.
- Advantage: Existing implementations of
UTF-8 and UTF-9 by Mark Crispin.
Prerequisites
Phase 1: Feasibility & Toolchain Setup
- Choose a Python version:
MicroPython for embedded profile
Python 2.x for simpler VM logic
- Toolchain Options:
- Emulators:
SIMH, KLH10
- Document Processors: Runoff Formatter in Python
- Compilers:
MACRO-10, BLISS, C10, KCC or modern cross-compiler
Phase 2: Environment Design
- Target OS:
TOPS-10 – minimal
TOPS-20 – richer
ITS – hacker-friendly
- Implement:
- Basic C runtime wrappers
- File I/O and memory emulation
Phase 3: Incremental Port
- Adapt VM or bytecode interpreter:
- Replace types with PDP-10-friendly abstractions
- Handle word size in operations and memory model
- Stub out unsupported libraries
Phase 4: Debugging and Testbed
- Use emulators to run scripts
- Write and test simple programs
- Log outputs and debug steps
Phase 5: Extensions
- Interface with MACRO-10 routines
- Define new UTF8 and UTF9 macros, with conversion routines
- Optimize memory handling
Deliverables
- Source code and build scripts
- Memory/architecture notes
- Mini stdlib subset
- Working test suite
Optional Future Work
- Cross-assembler in Python
- ITS scripting support
- Browser-based demo (SIMH + Python)