• The program is designed to emulate a scoreboard and seven segment a hockey tournament. • There should be (in the DATA section) two null-terminated integer ar homescores and awayscores. These will be used to hold packed values ( that represent team scores. The maximum score will be 9. • The most significant four bits of the integer are the first score, the four bits, etc., with the four least significant bits read last. This me first value of homescores is Ox12345678 and the first value of awa Ox90182736, the scores are to be dealt with in this order: home 1, aw home 2, away 0; then home 3, away 1; home 4, away 8; home 5, away away 7; home 7, away 3; home 8, away 6. • Also in the DATA section is a byte array named scoreboard that wil values. The first represents how the home team's score would be s

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter7: Arrays
Section7.4: Arrays As Arguments
Problem 6E: (Electrical eng.) Write a program that declares three one-dimensional arrays named volts, current,...
icon
Related questions
Question
100%

Could you provide an example in ARM assembly, please?

Program Description:
• The program is designed to emulate a scoreboard and seven segment display for
a hockey tournament.
• There should be (in the DATA section) two null-terminated integer arrays called
homescores and awayscores. These will be used to hold packed values (as in HW8)
that represent team scores. The maximum score will be 9.
• The most significant four bits of the integer are the first score, then the next
four bits, etc., with the four least significant bits read last. This means if the
first value of homescores is 0x12345678 and the first value of awayscores is
0x90182736, the scores are to be dealt with in this order: home 1, away 9; then
home 2, away 0; then home 3, away 1; home 4, away 8; home 5, away 2; home 6,
away 7; home 7, away 3; home 8, away 6.
Also in the DATA section is a byte array named scoreboard that will hold two
values. The first represents how the home team's score would be shown on a
seven-segment display, and the second represents the away team in the same
manner.
For the seven segment display's values to be represented in binary, a 0 will
represent "off" and a 1 will represent "on". A single byte will be necessary to
represent a single digit, and the most significant bit will always be 0. To
represent a 0, for example, all of the segments except for the middle one will be
on. The table below shows each digit and what will be stored for display on a 7-
segment display.
Digit represented
1
2
3
0
Byte stored (7seg) 0x3F 0x03 Ox5B 0x4F
6
7 8
9
Ox7D 0x07 0x7F 0x77
• For example, if the home score is 5 and the away score is 2, the scoreboard array
will hold Ox6D, 0x5B
• Also also in the DATA section is a single byte called winning. This value will be a
O if the home team won (a.k.a. their score was higher), a 1 if the away team won,
and a -1 (0xFF) if it's a tie (a.k.a. both scores are the same).
4
5
0x660x6D
• The program is to cycle through the home and away scores one value at a time
then store the values for scoreboard and winning. Each time through the loop,
these will be overwritten (in other words, you'll only have one set of scores' data
stored at any given point)
Transcribed Image Text:Program Description: • The program is designed to emulate a scoreboard and seven segment display for a hockey tournament. • There should be (in the DATA section) two null-terminated integer arrays called homescores and awayscores. These will be used to hold packed values (as in HW8) that represent team scores. The maximum score will be 9. • The most significant four bits of the integer are the first score, then the next four bits, etc., with the four least significant bits read last. This means if the first value of homescores is 0x12345678 and the first value of awayscores is 0x90182736, the scores are to be dealt with in this order: home 1, away 9; then home 2, away 0; then home 3, away 1; home 4, away 8; home 5, away 2; home 6, away 7; home 7, away 3; home 8, away 6. Also in the DATA section is a byte array named scoreboard that will hold two values. The first represents how the home team's score would be shown on a seven-segment display, and the second represents the away team in the same manner. For the seven segment display's values to be represented in binary, a 0 will represent "off" and a 1 will represent "on". A single byte will be necessary to represent a single digit, and the most significant bit will always be 0. To represent a 0, for example, all of the segments except for the middle one will be on. The table below shows each digit and what will be stored for display on a 7- segment display. Digit represented 1 2 3 0 Byte stored (7seg) 0x3F 0x03 Ox5B 0x4F 6 7 8 9 Ox7D 0x07 0x7F 0x77 • For example, if the home score is 5 and the away score is 2, the scoreboard array will hold Ox6D, 0x5B • Also also in the DATA section is a single byte called winning. This value will be a O if the home team won (a.k.a. their score was higher), a 1 if the away team won, and a -1 (0xFF) if it's a tie (a.k.a. both scores are the same). 4 5 0x660x6D • The program is to cycle through the home and away scores one value at a time then store the values for scoreboard and winning. Each time through the loop, these will be overwritten (in other words, you'll only have one set of scores' data stored at any given point)
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Returning value from Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage