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 2 3 4 5 6 Byte stored (7seg) Ox3F 0x03 Ox5B 0x4F 0x66 0x6D 0x7D • For example, if the home score is 5 and the away score is 2, the scoreboard array will hold Ox6D, Ox5B 0 1 7 8 9 0x07 0x7F 0x77 • 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 (OxFF) if it's a tie (a.k.a. both scores are the same). • 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)

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
100%

Could you code this example in uVision with ARM Assembly? Preferably with subroutines.

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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY