A road game hidden in a BASIC listing

DONKEY.BAS was more than a small diversion: it was a sample program that let early IBM PC owners see what the machine’s BASIC language could do. BASIC was a programming language designed to be relatively approachable, and its interpreter could run commands from a program while displaying the result on screen.

The game’s source code—the human-readable instructions—came with the program. Curious users could run it, then inspect or change the instructions themselves. That made the donkey-dodging challenge a practical demonstration as well as a joke: a few lines of code could turn keyboard input and simple screen graphics into something playable.

A tiny program built around a simple loop

The action depended on a repeated cycle. The program drew a stretch of road, read the player’s steering input, moved the car, and checked whether it had hit a donkey. Then it updated the display and did it again. The blocky scenery reflected the modest graphics available to the PC, but the essential game logic—input, movement, collision, repeat—was already there.

That simplicity mattered. A user did not need a large development studio or specialized tools to understand the basic structure of a game; the listing exposed the steps in a form they could experiment with. DONKEY.BAS made the computer’s role visible: the PC was not only running software, but also inviting its owner to tinker with how that software worked.