Claude Codes on a 1981 PC: ClawDOS Brings AI Agents to DOS

By Mirrorize ·

Claude Codes on a 1981 PC: ClawDOS Brings AI Agents to DOS

In 1981, the IBM PC XT shipped with 640 KB of RAM and an 8088 processor running at 4.77 MHz. Last week, a developer named Ricapar connected that machine to Claude and taught it to code.

ClawDOS is a 176 KB harness that lets you type natural-language prompts at a DOS C:\> prompt and watch Claude write, compile, and run C code—all in real time on the vintage PC. No emulator needed if you have an actual machine. The whole thing is open-source and runs on FreeDOS.

What people are making with it

In the first demo, ClawDOS was asked to write a prime-number printer. One message: "Write PRIMES.C: print the primes below 100. Compile it with Turbo C and run it." The agent read its built-in compiler guide, wrote the code, and compiled and ran it in one tool call—64 seconds end-to-end, with 26 of those spent actually compiling and linking. The list of primes appeared on the green screen.

The second demo is more ambitious. ClawDOS wrote a WarGames tribute game on the PC itself—not handed to it, but created by the agent running on the XT. Five files of Turbo C totaling 15 KB, producing a 10 KB executable with a vector-drawn world map, missiles arcing over the pole, a tic-tac-toe endgame, and PC speaker music. When you start a fresh conversation and say "your WarGames demo," ClawDOS opens its memory note in C:\MEMORY, finds the latest build, and runs it again.

The developer filmed both running on the original 5160's IBM monitor and posted them online.

What's actually good (and what isn't)

The constraint is the whole point. ClawDOS shows what an AI agent harness needs when the brain runs in the cloud: about 13,000 lines of C and C++ for the client, built with Open Watcom to target the 8086 instruction set. Claude wrote all of that code except the README. The agent can run 18 tools—file read/write, DOS programs, screenshots, memory, ports, and PC speaker control.

What you don't get: modern development velocity. A single PRIMES query takes 64 seconds. The harness shares the 640 KB memory pool with Turbo C, so it unloads itself when compiling and loads back in after. Vision is limited to CGA graphics (320×200, 4 colors). This is not faster or better than a modern IDE. It's entertainment and a test of constraints.

One honest limitation: you need a bridge PC running Python to handle TLS and keep the API key safe. The 1981 hardware can't do HTTPS.

How to try it

If you have a real IBM PC XT or 5160, the project ships with everything you need on GitHub—a bootable disk image and instructions. You'll need to build it with Python scripts and run a tunnel on another machine.

If you don't have vintage hardware, the same code runs in emulators like 86Box or DOSBox-X. The project includes 31 boot tests and unit tests that run on DOS itself.

You'll need your own Anthropic API key; the agent can switch models with the /model command and talks to anything that speaks the Claude Messages API.

Sources





More from the Learning Center

Make AI art · AI video · AI music on Mirrorize, free to start.