The lines of code are still there from the last post. What's been added are:
Lines 40-90: Read the cursor keys, set the direction (DI) and call the movement subroutine. Pressing 'space' will end the program.
Line 26: Line 26 provides initialization of the movement routines (the variables are explained below), and creates a ball (81) character at (3,3).
Lines 10020 - 10110 make up the movement subroutine. This subroutine will likely change quite a bit as time goes on.
Line 10020 erases the current ball at the current player position.
Lines 10040 - 10100 set the values of SX and SY for plotting the character, and line 10105 jumps to the display subroutine.
Within the movement handler, the following variables have the following meaning:
UX (Upper X): The highest value for SX; this is the rightmost boundary of player movement.
UY (Upper Y): The highest value for SY; this is the bottommost boundary of player movement.
LX (Lower X): The lowest value for SX; this is the leftmost boundary of player movement.
LY (Lower Y): The lowest value for SY; this is the uppermost boundary of player movement.
DI: This is the movement direction:
- DI = 1 : Left movement.
- DI = 2 : Right movement.
- DI = 3 : Movement up.
- DI = 4 : Movement down.
The next step will be setting up a maze and configuring non-traversable walls.

