''Donkey'', often known by its
filename
A filename or file name is a name used to uniquely identify a computer file in a file system. Different file systems impose different restrictions on filename lengths.
A filename may (depending on the file system) include:
* name – base ...
''DONKEY.BAS'', is a
video game
A video game or computer game is an electronic game that involves interaction with a user interface or input device (such as a joystick, game controller, controller, computer keyboard, keyboard, or motion sensing device) to generate visual fe ...
written in 1981 and included with early versions of the
IBM PC DOS
IBM PC DOS (an acronym for IBM Personal Computer Disk Operating System),Formally known as "The IBM Personal Computer DOS" from versions 1.0 through 3.30, as reported in those versions' respective COMMAND.COM outputs also known as PC DOS or IBM ...
operating system
An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ...
distributed with the original
IBM PC. It is a top-down
driving game in which the player must avoid hitting
donkey
The donkey or ass is a domesticated equine. It derives from the African wild ass, ''Equus africanus'', and may be classified either as a subspecies thereof, ''Equus africanus asinus'', or as a separate species, ''Equus asinus''. It was domes ...
s. The game was written by
Microsoft
Microsoft Corporation is an American multinational corporation and technology company, technology conglomerate headquartered in Redmond, Washington. Founded in 1975, the company became influential in the History of personal computers#The ear ...
co-founder
Bill Gates
William Henry Gates III (born October 28, 1955) is an American businessman and philanthropist. A pioneer of the microcomputer revolution of the 1970s and 1980s, he co-founded the software company Microsoft in 1975 with his childhood friend ...
and early employee
Neil Konzen.
Although on the game's title screen it is simply named ''Donkey'', it is often referred to by its filename of ''DONKEY.BAS''. All BASIC programs used the ".BAS"
extension, and MS-DOS-compatible operating systems that came before
Windows 95 display file names in
upper case
Letter case is the distinction between the letters that are in larger uppercase or capitals (more formally ''#Majuscule, majuscule'') and smaller lowercase (more formally ''#Minuscule, minuscule'') in the written representation of certain langua ...
. These conventions are often maintained when the game is referred to in writing.
Gameplay
''DONKEY.BAS'' is a simple
driving game in which the
player
Player may refer to:
Role or adjective
* Player (game), a participant in a game or sport
** Gamer, a player in video and tabletop games
** Athlete, a player in sports
** Player character, a character in a video game or role playing game who i ...
controls a car but cannot steer, accelerate or brake, only changing lanes to avoid a series of
donkey
The donkey or ass is a domesticated equine. It derives from the African wild ass, ''Equus africanus'', and may be classified either as a subspecies thereof, ''Equus africanus asinus'', or as a separate species, ''Equus asinus''. It was domes ...
s on the road. There is no goal other than to avoid donkeys.
The game uses the
CGA display mode, the only colour graphics mode available on the original IBM PC. The mode allows four colours, but in ''DONKEY.BAS'' there are usually only three on screen.
The center of the screen shows a vertical
scrolling
In computer displays, filmmaking, television production, video games and other kinetic displays, scrolling is sliding text, images or video across a monitor or display, vertically or horizontally. "Scrolling," as such, does not change the layout ...
road with two lanes; the areas on either side of the road are used for
scores and instructions. The player's car is driving up the road, and every few seconds a donkey will appear at random on one side of the road at the top of the screen. As the donkey moves down the screen, the player can press the
space bar
The space bar is on the bottom center of the keyboard.
The space bar, spacebar, blank, or space key is a key on a typewriter or alphanumeric keyboard in the form of a horizontal bar in the lowermost row, significantly wider than all other keys. ...
to switch between lanes to avoid the donkey. If the car hits the donkey, both car and donkey explode, and parts of the graphics are scattered to the four corners of the screen to the sound of a short
monophonic
Monaural sound or monophonic sound (often shortened to mono) is sound intended to be heard as if it were emanating from one position. This contrasts with stereophonic sound or ''stereo'', which uses two separate audio channels to reproduce sou ...
tune played through the
PC speaker
A PC speaker is a loudspeaker built into some IBM PC compatible computers. The first IBM Personal Computer, model 5150, employed a standard 2.25 inch magnetic driven (dynamic) speaker. More recent computers use a tiny moving-iron or pie ...
, with the word "BOOM!" displayed on the left side of the screen. If the player avoids the donkey, it will scroll off the bottom of the screen, with the words "Donkey loses!" displayed on the right side of the screen, and after a few seconds another will appear. There is never more than one donkey on the screen at any one time.
The game keeps the score between the player and the donkeys. If the car hits a donkey, the donkey gets a point, and the player is returned to the start of the road. As the car avoids donkeys, it moves slowly up the screen, giving the player less time to react when donkeys appear. If the car avoids enough donkeys, the player receives a point, and the car is moved back to the bottom of the road. The game displays the number of points earned by the player and donkey, but does not end or change when a particular score is reached.
The
Esc key quits the game.
Sprites are rendered slightly differently between the QBasic interpreter and the original IBM BASICA/GW-BASIC interpreter.
Development

When
IBM
International Business Machines Corporation (using the trademark IBM), nicknamed Big Blue, is an American Multinational corporation, multinational technology company headquartered in Armonk, New York, and present in over 175 countries. It is ...
was developing its
personal computer
A personal computer, commonly referred to as PC or computer, is a computer designed for individual use. It is typically used for tasks such as Word processor, word processing, web browser, internet browsing, email, multimedia playback, and PC ...
in the late 1970s and early 1980s, it contracted Microsoft to develop an operating system and a version of the
BASIC
Basic or BASIC may refer to:
Science and technology
* BASIC, a computer programming language
* Basic (chemistry), having the properties of a base
* Basic access authentication, in HTTP
Entertainment
* Basic (film), ''Basic'' (film), a 2003 film
...
programming language to release with the new computer. The operating system was released as
IBM PC DOS
IBM PC DOS (an acronym for IBM Personal Computer Disk Operating System),Formally known as "The IBM Personal Computer DOS" from versions 1.0 through 3.30, as reported in those versions' respective COMMAND.COM outputs also known as PC DOS or IBM ...
when included with IBM PCs and as
MS-DOS
MS-DOS ( ; acronym for Microsoft Disk Operating System, also known as Microsoft DOS) is an operating system for x86-based personal computers mostly developed by Microsoft. Collectively, MS-DOS, its rebranding as IBM PC DOS, and a few op ...
when sold separately by Microsoft. Both included versions of
Microsoft BASIC
Microsoft BASIC is the foundation software product of the Microsoft company and evolved into a line of BASIC interpreters and compiler(s) adapted for many different microcomputers. It first appeared in 1975 as Altair BASIC, which was the first v ...
.
''DONKEY.BAS'' was written by
Bill Gates
William Henry Gates III (born October 28, 1955) is an American businessman and philanthropist. A pioneer of the microcomputer revolution of the 1970s and 1980s, he co-founded the software company Microsoft in 1975 with his childhood friend ...
and
Neil Konzen to demonstrate the IBM PC and the BASIC programming language's capability to produce interactive programs with color
graphics
Graphics () are visual images or designs on some surface, such as a wall, canvas, screen, paper, or stone, to inform, illustrate, or entertain. In contemporary usage, it includes a pictorial representation of the data, as in design and manufa ...
and
sound
In physics, sound is a vibration that propagates as an acoustic wave through a transmission medium such as a gas, liquid or solid.
In human physiology and psychology, sound is the ''reception'' of such waves and their ''perception'' by the br ...
. The game continues to generate interest, in part because of the involvement of Gates at a time when Microsoft was relatively small and only six years old. According to a speech delivered by Gates in 2001:
Apple
An apple is a round, edible fruit produced by an apple tree (''Malus'' spp.). Fruit trees of the orchard or domestic apple (''Malus domestica''), the most widely grown in the genus, are agriculture, cultivated worldwide. The tree originated ...
's
Andy Hertzfeld
Andrew Jay Hertzfeld (born April 6, 1953) is an American software engineer who was a member of Apple Computer's original Macintosh development team during the 1980s. After buying an Apple II in January 1978, he went to work for Apple Computer fr ...
mentioned the game in a description of the Macintosh team's reaction to the 1981 IBM PC purchased for them by Steve Jobs "to dissect and evaluate", noting that the new computer shipped with "some games written in BASIC that were especially embarrassing":
The first version of ''DONKEY.BAS'' was released in 1981, followed by version 1.10 in 1982. The operating systems with which the game was first distributed still work on modern computers with compatible
BIOS
In computing, BIOS (, ; Basic Input/Output System, also known as the System BIOS, ROM BIOS, BIOS ROM or PC BIOS) is a type of firmware used to provide runtime services for operating systems and programs and to perform hardware initialization d ...
and 5.25-inch floppy drives; however,
IBM BASICA
The IBM Personal Computer BASIC, commonly shortened to IBM BASIC, is a programming language first released by IBM with the IBM Personal Computer, IBM Personal Computer, Model 5150 (IBM PC) in 1981. IBM released four different versions of the Micr ...
which ran the program under PC DOS 1.x requires
ROM
Rom, or ROM may refer to:
Biomechanics and medicine
* Risk of mortality, a medical classification to estimate the likelihood of death for a patient
* Rupture of membranes, a term used during pregnancy to describe a rupture of the amniotic sac
* ...
-based
IBM Cassette BASIC
The IBM Personal Computer BASIC, commonly shortened to IBM BASIC, is a programming language first released by IBM with the IBM Personal Computer, Model 5150 (IBM PC) in 1981. IBM released four different versions of the Microsoft BASIC interpre ...
, which modern computers do not have. The
source code
In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer.
Since a computer, at base, only ...
is still available. The game may be played with the
GW-BASIC
GW-BASIC is a dialect of the BASIC programming language developed by Microsoft from IBM BASICA. Functionally identical to BASICA, its BASIC interpreter is a fully self-contained executable and does not need the Cassette BASIC ROM found in the ori ...
(original code) or
QBasic
QBasic is an integrated development environment (IDE) and BASIC interpreter, interpreter for a variety of dialects of BASIC which are based on QuickBASIC. Code entered into the IDE is compiled into an intermediate representation (IR), and this ...
(adapted code) interpreters or in
compiled form (see "
external links
An internal link is a type of hyperlink on a web page to another page or resource, such as an image or document, on the same website or domain. It is the opposite of an external link, a link that directs a user to content that is outside its d ...
" below).
Legacy

As a programming example for the new
platform and
Visual Basic Visual Basic is a name for a family of programming languages from Microsoft. It may refer to:
* Visual Basic (.NET), the current version of Visual Basic launched in 2002 which runs on .NET
* Visual Basic (classic), the original Visual Basic suppo ...
programming language, in 2001 Microsoft developed a game called in
homage to ''DONKEY.BAS''. It is a three-dimensional driving game in which the aim is to hit donkeys. The game demonstrates to programmers how a application can be structured and how to use various features of the platform. A version was also included as part of
Google
Google LLC (, ) is an American multinational corporation and technology company focusing on online advertising, search engine technology, cloud computing, computer software, quantum computing, e-commerce, consumer electronics, and artificial ...
's
wwwBASIC browser based interpreter.
See also
*
GORILLA.BAS
*
NIBBLES.BAS
References
External links
*
Speech in which Bill Gates and Ari Bixhorn discuss ''DONKEY.BAS'' and ''Donkey .NET''Story about Macintosh developers discovering ''DONKEY.BAS''Article on ''Donkey.bas'' with animation showing program running*
{{Microsoft FOSS
1981 video games
BASIC software
Commercial video games with freely available source code
DOS files
DOS games
IOS games
Linux games
Microsoft games
Single-player video games
Video games developed in the United States
Windows games
Works by Bill Gates