Question: In writing the project code, use only the following instructions and their variations for conditional branching ( such as BEQ, BNE, etc ) , conditional

In writing the project code, use only the following instructions and their variations for
conditional branching (such as BEQ, BNE, etc), conditional execution (such as ADDEQ, etc), size
designation (such as LDRH, etc), and flagging (such as SUBS etc): ADD, AND, B, BL, BX, CMP,
EOR, LDR, LSL, LSR, MOV, ORR, PUSH, POP, ROR, RRX, STR, and SUB.
No other instructions are allowed. Use of not-allowed instructions results in 0 point.
A. Problem
For a DE1-SoC system, write an ARM assembly code which down counts from a decimal number
to 0 by 1 while displaying the numbers on the HEX3-HEX07-segments (and, optionally, at the
same time on the VGA screen to earn extra 20 points. See Note 3 below for details of this option).
The starting number is determined by the positions of SW3-SW0, SW3 being the 1000s position,
SW2 being 100s position, SW1 for 10s, and SW0 for units. The following example clarifies a
decimal number obtained from SW positions:
Number SW3 SW2 SW1 SW0
------------------
10001000
11011101
01000100
Once the SW3-SW0 position determines the starting number, they are used no more. The counting
down process pauses when SW8 is pressed (i.e., SW8=1) and resumes when SW8 is released
(SW8=0). When testing your project code, after compilation, configure SW3-SW0 first, before
running the code.
Note 3: On the screen with background colored by the pixel color determined by the last four-
digits of your Howard ID, display the numbers horizontally at (10,20) location of the monitor.
This option, if successfully implemented, earns extra 20 points.
B. Coding instruction

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!