SNAKE (16K ZX81)
by K Feary, Wendover, Buckinghamshire
from Your Computer (February 1983), Pages 119-120

Snake is for an expanded ZX-81, and was inspired by a game which, when
reviewed for the BBC Micro, was said to be addictive. The object is to move
the snake around the screen so that it can eat plus signs and make its body
as long as possible. Any key in the top row will move the snake up. Any key
in the bottom row, except Shift, will move it down. Any key on the right of
the middle two rows moves it right and any key on the left of the middle
two rows moves it left.

Using >, <, A or V the snake's head points in the direction of motion. As
it moves more plus signs and obstacles  black squares  appear at random
positions. If the head hits an obstacle you must stop pressing the keyboard
before changing direction or destroying the obstacle by pressing SHIFT. If
the obstacle does not disappear then you were not trying to move the head

obstacle to be destroyed.

Each obstacle eliminated shortens the snake by one segment. The game ends
when the score is zero or when you try to move into a square which has part
of the snake's body in one of the four surrounding squares. Each time it
moves the characters making up the body are inverted. This gives the
illusion of motion and locates the new address of the snake's tail.

[The machine code listing shown in the magazine is incomplete. Three
instructions are missing starting at location $4172. All subsequent
addresses are correct and so this is not a bug in the program but an
incorrect printing of the program. The missing instructions are:

4172: 011213    LD BC,$1312
      110100    LD DE,$0001
      1816      JR $16
PF]