| The first report shows 100 people (95 plus 5 arrivals), 1,000 acres, and 2,800 bushels in store, left from a harvest of 3,000 bushels at 3 bushels per acre after rats ate 200. | 43_Hammurabi/hammurabi.bas L6–20 | Code |
| The book's description starts the city with 3,000 bushels in storage, but the listing's first report shows 2,800, because rats ate 200 of a 3,000-bushel harvest. | 43_Hammurabi/hammurabi.bas L7 | Code |
| Each year land trades at bushels per acre for a random in [0, 1), a whole number from 17 to 26. | 43_Hammurabi/hammurabi.bas L22–23 | Code |
| The player may buy land at the year's price if the store covers it, and buying any land skips the chance to sell that year. | 43_Hammurabi/hammurabi.bas L24–31 | Code |
| A sale pays the same price per acre into the store, and the city must keep at least 1 acre. | 43_Hammurabi/hammurabi.bas L32–37 | Code |
| Each person eats 20 bushels a year, so the number fed is the bushels given divided by 20, rounded down. | 43_Hammurabi/hammurabi.bas L74–75 | Code |
| Seed costs half a bushel per acre planted, rounded down, and must come from the store left after feeding. | 43_Hammurabi/hammurabi.bas L54–5543_Hammurabi/hammurabi.bas L62 | Code |
| One person can farm 10 acres, but Ahl's check is strict, so people may plant at most acres, where Dyment's FOCAL allows . | 43_Hammurabi/hammurabi.bas L58–60 | Code |
| The yield is a whole number of bushels per acre from 1 to 5, each equally likely, and the harvest is the yield times the acres planted. | 43_Hammurabi/hammurabi.bas L63–6543_Hammurabi/hammurabi.bas L92 | Code |
| A second roll of 1 to 5 sets the rats loose when it is even, 2 times in 5, and they eat the store divided by the roll (half on a 2, a quarter on a 4) before the harvest goes in. | 43_Hammurabi/hammurabi.bas L66–70 | Code |
| Arrivals are , where is a third roll of 1 to 5, the acres, the store after harvest and rats, and the population before starvation. | 43_Hammurabi/hammurabi.bas L71–73 | Code |
| A plague halves the population when , which holds for , a 20% chance, though the remark beside it says 15%. | 43_Hammurabi/hammurabi.bas L76–7743_Hammurabi/hammurabi.bas L13–15 | Code |
| Everyone not fed dies, and the population becomes the number fed; a surplus kills no one and the population stays. | 43_Hammurabi/hammurabi.bas L78–82 | Code |
| Starving more than 45% of the population in one year gets the ruler impeached and ends the game. | 43_Hammurabi/hammurabi.bas L79–86 | Code |
| A year with food to spare skips the update of the average starvation rate , so the next update counts that year at the old average instead of 0%. | 43_Hammurabi/hammurabi.bas L78–81 | Code |
| A term is 10 years of decisions; the 11th report ends the game with the rating. | 43_Hammurabi/hammurabi.bas L1043_Hammurabi/hammurabi.bas L21 | Code |
| The final rating tests the average yearly share starved, , and the acres per person, , against three pairs of limits, and the first pair the ruler fails sets the verdict. | 43_Hammurabi/hammurabi.bas L97–116 | Code |
Ahl's BASIC still sets C to 0 after a land trade and to 1 after feeding, values nothing reads before the next dice roll overwrites C, because in Dyment's FOCAL those lines reset the steward's patience. | 43_Hammurabi/hammurabi.bas L3043_Hammurabi/hammurabi.bas L3743_Hammurabi/hammurabi.bas L46 | Code |
| Ahl's steward answers an impossible order with "THINK AGAIN" and asks again as often as needed, and only a negative number ends the game. | 43_Hammurabi/hammurabi.bas L24–2843_Hammurabi/hammurabi.bas L87–96 | Code |
DEC's 1975 printing of the listing has the same rules and constants as the 1978 edition, except that its seed check, INT(D/2)<S, refuses a planting that would use the last bushel. | 43_Hammurabi/hammurabi.bas L55 | Publisher |
| Ahl's BASIC keeps Dyment's rules for seed, the harvest, rats, arrivals, and food, down to the arrivals formula . | 43_Hammurabi/hammurabi.bas L62–75 | Code |