Question
Create a WASP assembly program that allows the user to move a red dot around the screen. The red dot should start near the middle
Create a WASP assembly program that allows the user to move a red dot around the screen.
The red dot should start near the middle of the screen, and the user can make it move up/down/left/right by holding down the arrow buttons on the ArtMaster peripheral. The program will run continuously, and the user can keep moving the dot around until they get bored.
When the dot reaches the sides of the screen (top, bottom, left, right) the dot should not disappear. You can either make the dot stop at the edges or wrap around by appearing from the opposite edge. Its up to you.
Hints: You will need two variables to store the X and Y coordinates of the dot.
When you move the dot, you can delete the old dot by drawing a white square in the old location, then draw a red dot in the new location.
Check the WASP manual for information about how to draw a dot and how to detect button presses for the Painter peripheral. Note that input from the buttons is asynchronous (you dont need to use a spin-lock.)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started