DICING WITH MEMORY (ZX81)
by Christopher Tolley, Plaistow, London E13
from Your Computer (May 1982), page 85

The way my dice generator is written means that it will just squeeze into
1K, if you drop the REM statement in line 0, and will draw up to three
dice. Owners of ZX-81s with more than 1K RAM may change line 90 to draw
more.

The point of interest in this program is the use of variables instead of
numbers. I did this because numbers consume valuable space in an unexpanded
machine. Most of these variables are assigned in lines 10 to 60. The dice
are drawn in the loops from 120 to 160, as black squares. Depending on the
value generated in line 110, certain of the points in these squares are
unplotted in lines 170 to 270. Line 280 waits for you to press Newline
before drawing a new set of dice.

The program starts at line 0. This line number cannot be directly entered
without causing a syntax error. The way I did it was to enter the lines as
5 REM and so on, and then use a direct command.

    POKE 16510,0

which changes the line number to zero.

Any line number may be POKEd in this way, but it is important to remember
when dealing with numbers greater than 255 that they are stored with the
more significant byte first  other addresses, such as in the system
variables, are stored the other way round.

