Hamurabi is a text-based game of land and resource management and is one of the earliest computer games. Its name is a shortening of Hammurabi, reduced to fit an eight-character limit.
Doug Dyment wrote The Sumer Game in 1968 as a demonstration program for the FOCAL programming language, programming it on a DEC PDP-8. The game has often been inaccurately attributed to Richard Merrill, the designer of FOCAL. Once a version of BASIC was released for the PDP-8, David H. Ahl ported it to BASIC. The game spread beyond mainframes when Ahl published an expanded version of it in BASIC Computer Games, the first best-selling computer book. The expanded version was renamed Hamurabi [sic] and added an end-of-game performance appraisal. This version was then ported to many different microcomputers and published as a type-in program in many books and magazines throughout the 1980s.
Like many BASIC games of the time, Hamurabi was mainly a game of numeric input. As the ruler, the player could buy and sell land, purchase grain and decide how much grain to release to his kingdom.
I was fifteen years old and in love with a game called Sumer, which put me in charge of an ancient city-state in the Fertile Crescent. Today's computer gamers might snicker at its crudity: its progress consisted of all-capital type pecked out line by line on a paper scroll. You'd make decisions, allocating bushels of grain for feeding and planting, and then the program would tell you how your city was doing year by year. "Hamurabi," it would announce, like an obsequious prime minister who feared beheading, "I beg to report..."
Within a couple of days of play I'd exhausted the game's possibilities. But unlike most of the games that captivate teenagers today, Sumer invited tinkering. Anyone could inspect its insides: the game was a set of simple instructions to the computer, stored on a paper tape coded with little rows of eight holes.
- Kingdom (1974) by Lee Schneider and Todd Voros.
- Dukedom (1976), an expanded version of Hamurabi.
- King (1978) by James A. Storer, set in modern times and printed in Ahl's More Basic Computer Games.
- Santa Paravia en Fiumaccio (1978) by George Blank which takes place in Renaissance Italy.
- Dynasty (1978), a somewhat expanded version of Hamurabi set in feudal China.
- Manor (1986), a derivative of Dukedom.
-  DECUS Program Library Catalog, p. F - 1
- Ahl, David. "David H. Ahl biography from Who's Who in America". Retrieved 2009-11-23.
- "BASIC Computer Games: Hammurabi". AtariArchives.org. Retrieved 2009-11-23.
- Rosenberg, Scott. "Dreaming in Code". Retrieved 2009-11-23.
- HMRABI code listing
- Pournelle, Jerry (November 1984). "NCC Reflections". BYTE. p. 361. Retrieved 23 October 2013.
- Stanton, Jeffrey; Wells, Robert P. Ph.D.; Rochowansky, Sandra; Mellid, Michael Ph.D., ed. (1984). The Addison-Wesley Book of Atari Software. Addison-Wesley. p. 193. ISBN 0-201-16454-X.
- "BASIC Computer Games: King". AtariArchives.org. Retrieved 2009-11-23.
- "Big Computer Games: Dukedom". AtariArchives.org. Retrieved 2009-11-23.
- Ferguson, Derek. "What I Did on My Holiday Vacation". .NET Developers Journal. Retrieved 2009-11-23.
- The Sumer Game variants at MobyGames
- Hamurabi can be played for free in the browser at the Internet Archive
- July 1973 DECUS Catalog listing for FOCAL8-5 The Sumer Game - pdf
- David Ahl's BASIC program listing — scan
- David Ahl's BASIC program listing — text
- C99 port by Brian L. Troutwine