DICTATOR for Sinclair ZX-81
by Martin Bishop
from Your Computer, February 1982


You are a dictator in a small city for a period of 10 years. Each year
you can buy and sell land, sow your land with corn, and feed your
populace. If you do not feed your people properly - 10 bags of corn
per person per year - some will starve, and if too many die the
survivors may rebel against you.

Each acre sown requires one bag of corn. The harvest from the land is
your only income, unless you speculate with land, buying and selling
at different prices. Beware, though, of the rats; they eat corn but
not land. After 10 years you will be given a report and a score.

[There are two versions of the program: 
[DICTATOR for 16k ZX-81 and DICTAT1K for the 1k ZX-81.
[
[There were several errors in the 16k listing:
[
[1000 CLS
[had to be added to stop the restart display getting messed up.
[
[1410 IF AS=A THEN GOTO 1460
[changed to
[1410 IF AS<=A THEN GOTO 1460
[
[9200 IF A$="" THEN GOTO 9206
[changed to
[9200 IF A$<>"" THEN GOTO 9206
[
[; AT 5,0;
[had to added at the end of 9300 PRINT ... to stop the subsequent
[display getting messed up.                                      
[
[JimG]


DICTATOR 16k notes
------------------

  10- 120  sets up variables
1000-1100  displays current status
1110-1230  input "acres to be sold"
1240-1360  input "acres to be bought"
1370-1560  input "acres to be sown"
1570-1680  input "bags to feed population"
2000-2170  calculates status
2200-2280  rebellion routine
2400-2500  report after 10 years
Subroutines
9000-9050  indicates too little land to do as asked
9100-9130  erases a line indicated by QQ
9200-9270  checks syntax of inputs and converts to a number
9300-9310  status update
9400-9410  indicates too little corn to do as asked
9500-9510  prints a line
Variables
  A = number of acres of land owned
 AP = number of acres planted with corn
 AS = numerical form of input
 A$ = string input
  C = number of bags of corn owned
  H = bags of corn harvested per acre
  I = FOR/NEXT loop variable
  L = price of land in bags of corn per acre
 NP = number of people who came to city
  P = population of city
 QQ = line to be erased
  R = bags of corn eaten by rats
 SP = number of people starved in one year
TSP = total number of starved people
 SC = score
  Y = year
  Z = input check (1=invalid entry, 0=valid entry)


DICTATOR 1k notes
------------------

  Y = year number
  P = population
  L = price of land in bags per acre
  A = acres of land owned
  C = number of bags of corn owned


