Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is for computer architecture assembly language RISC-V rars. SW 3 - Control Flow Learning Objectives: . To practice writing flowcharts to describe the steps

This is for computer architecture assembly language RISC-V rars.

image text in transcribed

SW 3 - Control Flow Learning Objectives: . To practice writing flowcharts to describe the steps of a program. To practice writing assembly language programs that make use of control flow Assignment: First, create a flowchart that will perform the following behavior. Then implement the flowchart with OTTER MCU assembly language using only the instructions in the OTTER assembly manual. Make sure your code is formatted properly including comments. Use the RARS simulator to ensure the program performs as desired. a. Read a 32-bit unsigned value from SWITCHES (address 0x11000000). If the input is greater than or equal to 32,768, the value is divided by 4. You can ignore any remainder. If the value is less than 32,768, the value is multiplied by 2. The result should be written to the 7 SEGMENT (address 0x11000040). b. Read two 16-bit unsigned values consecutively from SWITCHES (address 0x11000000). Divide the first value by the 2nd and output the quotient (result) to 7 SEGMENT (address 0x11000040) and the remainder to LEDS (address 0x11000020). If you try to divide by zero, turn all of the seven segments and LEDS on (output 0xFFFFFFFF). SW 3 - Control Flow Learning Objectives: . To practice writing flowcharts to describe the steps of a program. To practice writing assembly language programs that make use of control flow Assignment: First, create a flowchart that will perform the following behavior. Then implement the flowchart with OTTER MCU assembly language using only the instructions in the OTTER assembly manual. Make sure your code is formatted properly including comments. Use the RARS simulator to ensure the program performs as desired. a. Read a 32-bit unsigned value from SWITCHES (address 0x11000000). If the input is greater than or equal to 32,768, the value is divided by 4. You can ignore any remainder. If the value is less than 32,768, the value is multiplied by 2. The result should be written to the 7 SEGMENT (address 0x11000040). b. Read two 16-bit unsigned values consecutively from SWITCHES (address 0x11000000). Divide the first value by the 2nd and output the quotient (result) to 7 SEGMENT (address 0x11000040) and the remainder to LEDS (address 0x11000020). If you try to divide by zero, turn all of the seven segments and LEDS on (output 0xFFFFFFFF)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

7. Explain the frequency of intercultural dating today.

Answered: 1 week ago

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago