Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Can you write code based on CPUlator's ARMv 7 DE 1 - SoC system containing an ARMv 7 processor ? Sample Output: table [
Can you write code based on CPUlator's ARMv DESoC system containing an ARMvprocessor
Sample Output:
tableSource Code:
The source code is in the attached file.
Explanation:
We have designed a game where we want contestants to estimate the closest
number to the number generated by the system. First, our program generates
a number in the start, START, TEMP and RANDOM subroutines. And assigns
the necessary fields to the register such as buttons and sevensegment display.
The Sevensegment display also shows PLAY. PLAY will continue to appear until
the user presses key When KEYO is pressed, the game starts for the first
contestant and starts writing on the sevensegment display. Competitors
can change the number they guess using Key and Key Key increases tens
digit from to if the number is it returns to key increases the units'
digit, if the number is it returns These operations are performed using
read, count, compare compare count segcode subroutines. After the
first competitor enters the number he wants, he presses key so that the
second competitor starts to play and starts writing on the sevensegment
display. In this process, the user subroutine is used. The second competitor
changes the number using key and key and when he finishes, he presses
key After two competitors have successfully entered their predicted
numbers, the program starts calculating the nearest number to the generated
number. It does this with using the result subroutine. In the result subroutine,
the values given by the two competitors are subtracted from the generated
number and the closest number is found. While these operations are being
performed, generated number appears in the sevensegment display. For
example, if the generated number is then appears After a certain
period of time, which contestant wins and the winning number will appear on
the sevensegment display. If the first competitor has entered the second
contestant has entered in this case appears in the sevensegment
display. After a certain period of time, won text will appear in sevensegment
display, the final subroutine is used for that process and after that the game
will start over. If the constents want to play again, they need to press key to
start the game again.
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