r/DOS • • 13d ago

Any love for Python 3 on an 8088?

Post image

Not sure how everyone here feels about AI, but I used ChatGPT to help port MicroPython to 16-bit DOS.

It's running on my Tandy 1000 EX with a 7 MHz NEC V20 processor. It supports a surprising amount of Python 3 functionality, including classes, generators, regular expressions, JSON, SHA-256, and more.

It's still a work in progress, but I'm pretty happy with how far it's come!

Source: https://github.com/ARMoir/micropython/tree/tandypy-dos16-port/ports/dos16

55 Upvotes

7 comments sorted by

2

u/ProfessorMedical5332 13d ago

Interesting. I have a few questions regarding the DOS port if you wouldn't mind. How large is the executable? Have you performed any speed tests, like how long it takes to count from -32768 to 32767? In VM.C, it appears the instruction pointer is not guarded. Are there instances where the programmer can poke a number in the wrong place causing the port to crash? Thank you.

2

u/A13X3989 13d ago

The current PY86.EXE is 345 KB. I've done quite a bit of benchmarking under DOSBox Staging, along with some testing on my Tandy, but I haven't tried that specific counting benchmark yet. It does also look like corrupted bytecode or memory could potentially cause a crash. Those are both good tests to add!

1

u/ProfessorMedical5332 13d ago

Thank you for the reply. Which benchmarking test did you do? I'd like to measure that against my own VM.

2

u/A13X3989 13d ago edited 12d ago

I actually tried the counting through 65,536 integers and it took 3.19 seconds in DOSBox, there are a few more tests on GitHub as well, I would love to hear you results! https://github.com/ARMoir/micropython/releases fixing link

2

u/ProfessorMedical5332 12d ago

I'm getting 1.1 seconds at 3000 cycles/ms in DOSBox, but my VM is heavily optimized, macro expansions everywhere/register locals. Thanks for the results. Good luck!

2

u/DOS-Games-World 11d ago

345 KB for the interpreter is a striking fit for a V20-era machine. I'm curious how much conventional memory is left after loading it, and whether you've tried a tiny text-mode game or utility as a real-hardware test.

2

u/A13X3989 11d ago

Actually just added a small curses lib and a Snake game that runs shocking well!