This code has a "players" position plotted on a 2-D plane. The initial coordinates are set to 4,4. From there the screen is cleared and a subroutine which reads the x,y variables and uses this to construct a instruction to be sent to the output screen. This subroutine will be explained in depth. Once the screen is updated, it reads the input port which is where I connected 4 buttons. The code then checks if the user pressed any of the buttons. If no button is pressed, it will continuously be in an input loop check. If it sees that 1 of the 4 keys is pressed it then jumps to a subroutine specified by which button is pressed. This subroutine checks for boundaries and stops the player from passing them. Also this subroutine adds/subtracts the value one from the x/y varible. The incremnet/decrement of the x/y is dependent on which button is pressed durring the input check loop.