Donkey.bas Turns 45: The 131-Line Game That Launched PC Gaming

Donkey.bas is 45 Years Old – 131 line of Glory

Donkey.bas, the 1981 IBM PC classic written by Bill Gates and Neil Konzen, celebrates its 45th birthday with a browser port. This simple lane-switching game, bundled with early IBM PC DOS, demonstrated the color graphics and sound capabilities of BASICA. The tribute page recreates the original CGA gameplay in JavaScript, offering a nostalgic trip back to the dawn of PC gaming.

You only switch lanes — avoid the donkey, or BOOM.
  1. vunderba

    Nice job. The sound effects are a bit too advanced because early IBM computers shipped with pretty simple, magnetically driven dynamic speakers.

    On a related note, I’ve actually spent the last four months working on a 100% faithful adaptation of both QBasic and QuickBasic 4.5 that runs entirely in the browser on a virtual CPU and hardware abstraction layer. It’s a love letter to everyone who learned to program on Microsoft’s BASIC interpreters in the ’80s and early ’90s.

    The best compliment I’ve received so far is from friends who grew up in the same era I did: when I fullscreen the browser, a few of them assumed it was a virtual machine running the real thing.

    A QBasic port of the original BASIC-based DONKEY.BAS was one of the first programs I got running in it:

    https://mordenstar.com/share/qbasic-core-demos

  2. nfriend

    Brings back memories of GORILLA.BAS! https://en.wikipedia.org/wiki/Gorillas_(video_game)

  3. ssl232

    > 1296 PRINT "THIS PROGRAM REQUIRES ADVANCED BASIC -- USE COMMAND 'BASICA'":COLOR 15,0,0:FOR I=1 TO 9000:NEXT: RESUME 1298

    TIL there is an “Advanced Basic”. I hope the naming was tongue in cheek.

  4. jamesdhutton

    For anyone unfamiliar with DONKEY.BAS: it’s notable for having been co-written by Bill Gates. More info on its history bere: https://en.wikipedia.org/wiki/DONKEY.BAS

  5. jkrauska

    Inspired by the 45th anniversary of the IBM PC, I got my slopmachine cracking on a port of DONKEY.BAS to work in a browser. Pretty happy with the result. As a young person I remember being fascinated that you could make a game like this with so little code.

  6. marcuskaz

    The game theory is all wrong, this is a cooperative game, either they both win or both lose. I don't see how the Donkey getting hit by a car should be classified as "Donkey wins"

  7. sedatk

    I once heard the rumor that DONKEY.BAS was the last piece of code Bill Gates wrote himself at Microsoft. I wonder if it's true.

  8. friarpuck

    Someone gave my grandfather a Games BASICA floppy that had this and other games on it. But this copy had a few games that had been "modified". I remember in DONKEY.BAS, it would curse at you if you hit the donkey. "YOU STUPID SONOFABITCH". We thought it was hilarious. My grandfather was less pleased. He took it away from us when he found out.

More from this day

2026-08-13