Fact-checked by Grok 2 weeks ago

DONKEY.BAS

DONKEY.BAS is a video game written in 1981 by Microsoft co-founder Bill Gates and developer Neil Konzen for the IBM Personal Computer. It is a rudimentary driving simulation in which the player controls a sports car on a two-lane road, pressing the spacebar to swerve and avoid donkeys that appear as low-resolution brown blobs, with the game ending upon collision. The program, saved as a BASIC source file, was bundled as a demonstration with early versions of PC DOS, including versions 1.00 and 1.10, to showcase the capabilities of Microsoft BASIC on the new hardware. The game's development occurred in late 1980 or early 1981 during Microsoft's collaboration with on the project, which launched in August 1981. and Konzen, then a teenage who later led Microsoft's Macintosh software efforts, worked overnight in a locked, overheated containing a PC to create the application under strict nondisclosure requirements. As later recounted in a 2001 keynote, "it was myself and Neil Konzen at four in the morning with this PC sitting in this small room... we wrote late at night a little application to show what the built into the PC could do." This effort was part of Microsoft's broader contract to supply interpreters and sample programs, helping to secure the partnership that propelled the company into the PC era. Despite its simplistic graphics—generated using BASIC's DRAW statements—and repetitive gameplay limited by the IBM PC's 4.77 MHz processor and CGA display, DONKEY.BAS holds historical significance as one of the first games distributed with a and a rare credited programming credit for . It exemplified early PC software's focus on functionality over polish and has been preserved in emulators and archives, inspiring modern recreations such as browser-based versions and ports to other platforms. The game's code, approximately 200 lines long, remains publicly available and serves as an artifact of computing's formative years.

Overview

Description

DONKEY.BAS is a single-player driving game in which the player maneuvers a along a vertically road divided into two lanes, avoiding donkeys that appear randomly at the top of the screen by pressing the spacebar to switch lanes. The game was developed specifically for the PC, utilizing the Interpreter on systems running versions 1.0 and 1.10. Released in August 1981, DONKEY.BAS was bundled with early PC systems as a demonstration program to highlight the hardware's capabilities and the possible with . The game's visuals employ low-resolution in CGA mode, using BASIC's commands to render a simple road with a dashed center line, a pixelated at the bottom, and donkeys moving downward; the road scrolls continuously to simulate motion. The scoring system tracks points for both the and the donkeys, with a collision awarding a point to the donkeys accompanied by an and "BOOM!" message, after which the restarts from the bottom of the road; successful avoidance grants the a point, and runs indefinitely until manually quit via the .

Historical Context

DONKEY.BAS emerged in 1981 during the launch of the (model ), which was unveiled on August 12 of that year and represented a major shift in the computing industry from centralized mainframe systems to accessible personal machines. 's entry into the market, powered by an microprocessor and PC DOS (based on Microsoft's ), legitimized PCs for business use and spurred widespread adoption by making computing more affordable and user-friendly for individuals and organizations. This transition accelerated the democratization of technology, moving away from expensive, room-sized mainframes controlled by specialists toward compact devices that could run on desktops. Developed specifically to demonstrate the potential of the new hardware, DONKEY.BAS was written by co-founder and programmer Neil Konzen in 1981, prior to the IBM PC's launch. The game was created as a simple demo application to illustrate the interactive graphics and programming capabilities of , the interpreter licensed to and integrated into the PC's BASIC variant (BASICA). As Gates later recounted, "It was myself and Neil Konzen at four in the morning with this prototype IBM PC... we wrote late at night a little application to show what the Basic built into the IBM PC could do," emphasizing its role in impressing IBM executives and early users with the platform's versatility. Bundled with PC-DOS 1.00 and early versions of the operating system, it served as an engaging example of how BASIC enabled rapid development of entertainment software on the 5150. In the broader context of early personal computing, DONKEY.BAS highlighted the accessibility of programming and on consumer , contrasting with the specialized environments of prior eras. Recognized as the first video game developed for the PC, it exemplified bundled software entertainment that came pre-installed to showcase the system's potential without requiring additional purchases. By providing a straightforward interactive experience, it underscored Microsoft's strategic partnership with and contributed to the platform's appeal during a time when personal computers were establishing their place in homes and offices.

Gameplay

Mechanics

In DONKEY.BAS, the primary objective is to control a car traveling along a two-lane road and avoid collisions with donkeys that appear randomly ahead, with the goal of surviving as long as possible to maximize the distance traveled. The game simulates forward motion through a continuously scrolling road, where donkeys are generated at the top of the screen in one of the two lanes and move downward toward the player's car at a constant speed, creating the illusion of approaching obstacles at varying distances. Success depends on timely lane changes to dodge each donkey, as only one donkey appears on the screen at a time, and failure to avoid it results in a collision that awards a point to the donkey and resets the road segment. Player controls are limited to a single input mechanism: pressing the spacebar toggles the car's position between the left (positioned at x=110) and the right (x=142), with no options for , braking, or fine adjustments. The car remains fixed at the bottom of the screen (y=105), and the road's ensures unpredictable donkey placements, requiring quick reactions to maintain progress. The serves as the only means to quit the game prematurely. Scoring emphasizes survival and avoidance, with the player's score (displayed as "YOU") incrementing by one each time a donkey passes the bottom of the screen without a collision, effectively measuring the number of successful dodges or units of distance covered. Conversely, the donkey's score (displayed as "") increases by one upon each collision, accompanied by an on-screen message such as " 1, YOU 0" to reflect the updated , followed by a brief of the crash and a reset. These scores accumulate within the play session, providing a competitive metric against the donkeys. There is no definitive win condition, as the game operates in an endless loop designed for high-score chasing through prolonged avoidance sequences. Collisions do not terminate play but penalize the player by advancing the 's score and restarting the current road segment, allowing continued attempts to outperform the cumulative donkey points; the session only concludes when the player presses . High scores are thus determined by the ratio of avoided donkeys to collisions, rewarding skillful lane toggling over extended play.

Audio and Visuals

DONKEY.BAS employs rudimentary graphics rendered in CGA mode at 320x200 with four colors, utilizing Microsoft BASIC's DRAW statements to create vector-based shapes for the and donkeys rather than text characters. The is depicted as a simple 29x45 outline positioned at the bottom of the screen, while donkeys appear as 32x25 figures that spawn at the top and move downward. The road consists of two lanes defined by straight white lines for the edges and a dashed center divider, with upcoming obstacles visible in a fixed to convey forward motion through periodic redrawing. The screen layout adopts a top-down , centering the road within the while allocating space on the left and right sides for score indicators: the number of donkeys hit by the player and the number missed, updated in real-time using text overlays. This design accommodates the PC's hardware limitations, operating without sprites or and relying on software-based line drawing for all visual elements. The game supports both and color CGA displays, though color enhances the distinction between road elements and obstacles. Audio in DONKEY.BAS is minimalistic, generated exclusively through the via the SOUND command, producing short beeps to provide feedback: continuous short high-frequency tones (approximately 20000 Hz) simulate engine noise during gameplay, a low-frequency beep (200 Hz) accompanies lane switches, while variable low pitches (37 to 237 Hz) signal collisions. No or multi-channel effects are present, reflecting the era's constraints on the single-channel hardware. Upon detecting a collision, visual includes an animated sequence where the car and are bisected and scattered across the screen using XOR operations for and repositioning over six frames, accompanied by centered "BOOM!" text in large font. The road and elements then regenerate continuously during by clearing and redrawing the scene at each update cycle, ensuring smooth scrolling without persistent artifacts. This approach highlights the game's adaptation to the 80-column for initial setup and low-overhead mode for runtime, prioritizing performance on the original 4.77 MHz PC.

Development

Background

In late 1980, approached to supply programming languages, including , for its forthcoming , marking a pivotal partnership that positioned as a key software provider for the PC launched in August 1981. The agreement, finalized in November 1980 for $430,000 total (including $385,000 for and other languages, and $45,000 for the OS), required to deliver not only but also demonstration programs to illustrate the viability of the hardware and software ecosystem, as sought to establish the PC as a credible business tool amid skepticism from corporate buyers. Bill Gates, Microsoft's co-founder, emphasized the need for engaging sample applications to highlight BASIC's capabilities and differentiate the IBM PC from competitors like Apple, whose computers featured recreational software such as to appeal to broader users. advocated for fun, interactive demos to demonstrate that BASIC could support more than just utilitarian tasks, addressing the early personal computing landscape where entertainment options were scarce and machines were primarily viewed as productivity devices. To meet this demand, recruited Neil Konzen, a young programmer renowned for his expertise in from development, as one of its earliest employees to contribute to rapid prototype creation. Konzen's involvement stemmed directly from the urgency to produce simple yet compelling examples that showcased 's potential for graphics and user interaction, fulfilling IBM's requirements for bundled software that went beyond basic utilities.

Programming and Release

DONKEY.BAS was developed in early 1981 by Microsoft co-founder Bill Gates and employee Neil Konzen during an intense overnight coding session on a prototype IBM PC, motivated by the need to create a simple demonstration application for an upcoming IBM presentation. According to Gates, the pair worked until around 4 a.m. in a small, locked closet room that exceeded 100°F (38°C), under significant time constraints to showcase the capabilities of the Microsoft BASIC interpreter integrated into the IBM PC. This rushed environment contributed to the game's minimalist design, with no advanced debugging tools available in the early BASIC environment, leading to straightforward implementations like direct coordinate comparisons for key features. The game was written entirely in the interpreter for the PC, comprising approximately 200 lines of code. Road scrolling was achieved through loops that incrementally updated and redrew vertical elements, such as the center line animated every third frame using pixel overlays. Donkey placement relied on the function for random lane selection at the top of the screen, introducing unpredictability with one donkey appearing at a time. Collision detection employed basic position checks, comparing the car's coordinates (, ) against the donkey's (, ) to trigger an explosion sequence and "BOOM!" message upon overlap. DONKEY.BAS was released as part of in August 1981, coinciding with the 's launch, and carried over to version 1.10 in 1982. The full was included openly on the boot disks, allowing users to view, modify, and learn from it directly within the environment. Distribution occurred via pre-installed floppy disks bundled with , where users could launch the game by loading the and executing the DONKEY.BAS file, typically via a simple . This approach encouraged experimentation and served as an educational tool for early PC owners.

Reception and Legacy

Contemporary Response

Upon its inclusion with the IBM PC in 1981, DONKEY.BAS received mixed initial reactions, primarily serving as a demonstration tool rather than a standalone product. Users and early adopters appreciated its simplicity as an accessible introduction to the PC's graphics and input capabilities, often using it as an immediate "" to engage with the new without complex setup. This bundled demo helped foster excitement around personal computing by providing a quick, interactive experience for novice owners, aligning with and Microsoft's goal of showcasing BASIC's potential for graphical applications. From the Microsoft perspective, the game was regarded as a pragmatic success in demonstrating the platform's features during late-night development sessions with prototype hardware. , who co-authored the code with Neil Konzen, later reflected on it fondly in a 2001 keynote address, recounting the effort as a creative, if rudimentary, push to highlight the PC's graphics at four in the morning, despite acknowledging the game's poor quality. similarly valued it as an effective sample program to illustrate the versatility of their new machine, contributing to the overall appeal of the PC ecosystem. Criticism emerged prominently from the rival Apple Macintosh development team, underscoring the early PC-Mac competition. In August 1981, described the bundled games, including DONKEY.BAS, as "especially embarrassing," singling it out as the worst due to its low-resolution graphics and simplistic design. This view highlighted perceived shortcomings in the IBM PC's entertainment software compared to Apple's more polished offerings. Media coverage in the early 1980s treated DONKEY.BAS as a quirky example of bundled software rather than subjecting it to formal reviews, given its status. It appeared in publications like the June 1984 issue of , noted alongside other entertainment programs such as ART.BAS as part of the PC distribution. Hobbyists frequently modified its open to experiment with graphics and mechanics, reflecting its role in encouraging programming tinkering among early PC enthusiasts.

Modern Interpretations

In the early 2000s, Microsoft created Donkey .NET, a three-dimensional reinterpretation of the original game released as a demonstration for Visual Basic .NET developers during the framework's beta phase in 2002. Unlike the avoidance mechanics of DONKEY.BAS, this version inverted the gameplay by tasking players with colliding with donkeys using a 3D car model, showcasing advanced graphics and programming features available in the new language. The sample highlighted Microsoft's evolution in software development tools while paying homage to Gates' early work. Subsequent remakes expanded accessibility to modern platforms. In 2012, developer XVision released DONKEY.BAS for devices, faithfully recreating the top-down driving experience with touch controls, increased donkey speeds for added challenge, and compatibility with for leaderboards; an version followed in 2020. A port also emerged around the same period, adapting the game for mobile hardware while preserving its retro simplicity. These efforts brought the 1981 title to contemporary audiences, emphasizing its historical novelty as the first PC game co-authored by . Enthusiast recreations further demonstrated the game's enduring appeal in retro computing communities. In , VileR developed "Sorry Ass," a 512-byte that emulates DONKEY.BAS mechanics in , runnable directly from a image to celebrate the PC's 35th anniversary. Online emulators like PCjs have enabled browser-based play of the authentic 1981 since the , allowing users to experience it on original simulations without physical equipment. Beyond gameplay revivals, DONKEY.BAS holds educational value in history curricula, illustrating early programming in and Microsoft's foundational role in the industry. It serves as a in introductory texts on software evolution, highlighting how simple demos like this bundled with 1.0 helped popularize interactive for non-experts in the . Modern analyses, such as those extracting its rudimentary , underscore its technical ingenuity within hardware constraints, informing discussions on origins.

References

  1. [1]
    Bill Gates Speech Transcript - Tech Ed 2001
    ### Summary of Bill Gates' Discussion on DONKEY.BAS at Tech Ed 2001
  2. [2]
    PC-DOS (included game) (1981) - MobyGames
    BAS. Directing a sports car on a stretch of rural road, the player must beware of donkeys roaming its picturesque lanes. Spot a donkey ahead and the player ...
  3. [3]
  4. [4]
    DONKEY.BAS from PC DOS 1.00 (1981) - PCjs Machines
    This configuration includes a predefined state, with PC DOS 1.0 already booted and DONKEY.BAS ready to run. This particular machine has been configured to ...<|control11|><|separator|>
  5. [5]
    Bill Gates and DONKEY.BAS - Coding Horror
    May 14, 2007 · Bill Gates was an actual programmer. One bit of hard evidence is the BASIC program DONKEY.BAS included with original IBM PCs running IBM DOS 1.10.
  6. [6]
    Bill Gates on Writing 'DONKEY.BAS,' the First-Ever PC Game
    Feb 8, 2018 · BAS" part just means that it was written in BASIC.) Here's how Gates described the process of building "DONKEY.BAS" in a 2001 keynote:.
  7. [7]
    donkey.bas - GitHub
    Donkey, often known by its file name DONKEY.BAS, is a computer game written in 1981 by Microsoft co-founder Bill Gates and Neil Konzen. This is the original ...
  8. [8]
    Donkey [v1.10] : Bill Gates : Free Download, Borrow, and Streaming
    Jun 30, 2016 · Game written with Microsoft Advanced BASIC included with IBM's PC-DOS. Developed by. Microsoft Platform DOS Published by. IBM, Microsoft
  9. [9]
    Donkey - Folklore.org
    It came with some games written in BASIC that were especially embarrassing. The most embarrassing game was a lo-res graphics driving game called "Donkey". The ...<|control11|><|separator|>
  10. [10]
    How the IBM PC Won, Then Lost, the Personal Computer Market
    Jul 21, 2021 · The IBM PC, introduced in August 1981, helped reassure corporate customers that personal computing was serious.
  11. [11]
    1981 | Timeline of Computer History
    The IBM PC revolutionized business computing by becoming the first PC to gain widespread adoption by industry. The IBM PC was widely copied (“cloned”) and led ...
  12. [12]
    Code Walkthrough - maizure.org
    Decoded: DONKEY.BAS (1981) by Bill Gates and Neil Konzen for IBM Beginner-friendly, line-by-line code walkthrough by MaiZure Original source code: http ...Missing: text | Show results with:text
  13. [13]
    DONKEY.BAS - DOSContainer
    May 22, 2025 · DONKEY.BAS is a simple yet historically significant computer game that debuted with IBM's PC-DOS 1.00 in 1981.
  14. [14]
    The Rise of DOS: How Microsoft Got the IBM PC OS Contract - PCMag
    Aug 12, 2021 · On July 27, 1981, Allen and Brock signed a contract selling DOS to Microsoft for $50,000 plus favorable terms on upgrades of the languages.
  15. [15]
    Microsoft Founder Bill Gates Made One Of The Worst Driving Video ...
    Apr 23, 2025 · Bill Gates and Microsoft employee Neil Konzen worked one night until 4am to write DONKEY.BAS, and what they came up with did meet the essential ...
  16. [16]
  17. [17]
    DOS 1.0 and 1.1 | OS/2 Museum
    In August 1981, IBM released its Personal Computer (better known as the PC) and DOS 1.0. It was widely expected that Digital Research would release CP/M-86 for ...
  18. [18]
    44 Years Ago, Bill Gates Created One of the Worst Video Games in ...
    Apr 24, 2025 · Andy Hertzfeld, a former Apple employee, once labeled it “the most embarrassing game of all time.” With its simplistic graphics and basic ...Missing: 1984 | Show results with:1984
  19. [19]
    Full text of "PC Mag 1984-06-12" - Internet Archive
    Gaber, lists articles from magazines such as PC, BYTE, and ScftalkJIBM. ... DONKEY.BAS and the entertainment program ART. BAS. If you don't have this ...
  20. [20]
    Bill Gates' DONKEY.BAS for IBM PC remade for iPhone and iPad
    Feb 10, 2012 · The world's first PC game, DONKEY.BAS, co-written by Bill Gates, has been remade and released for iOS. It's available now for $0.99.Missing: visuals | Show results with:visuals
  21. [21]
    A remake of Bill Gates' first-ever game released for Apple TV - NME
    Jun 10, 2020 · App developer XVision has made their iOS app DONKEY.APP, a remake of Bill Gates' first-ever game, 1981's DONKEY.BAS, available for Apple TV.Missing: name | Show results with:name
  22. [22]
    Happy 35th birthday, IBM PC! - INT10h.org
    Aug 18, 2016 · So I'm a few days late to the party, but hopefully my little present can still be accepted: Sorry Ass, a tiny remake of DONKEY.BAS designed to ...
  23. [23]
    Fifty Years of BASIC, the Language That Made Computers Personal
    Apr 29, 2014 · DONKEY.BAS shipped with the original IBM PC in 1981. The most notable thing about it is its co-author, a fellow by the name of ...