Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Skeleton code: # Laboratory Exercise 9_1 .set noreorder # Avoid reordering instructions .text # Start generating instructions .globl start # This label should be globally
Skeleton code: # Laboratory Exercise 9_1 .set noreorder # Avoid reordering instructions .text # Start generating instructions .globl start # This label should be globally known .ent start # This label marks an entry point start: li $t0, 0xFFFF0010 # Load memory address of seven segment display li $t1, 0x1 # Initialise value to write to display repeat: sb $t1, 0($t0) # Write the value 0x1 to seven segment display b repeat # Branch to repeat label .end start # Marks the end of the programExercise 1 - Rotating Seven Segment Display Pattern MARS comes packaged with a number of add-on peripheral device simulators One of them is the Digital Lab Sim, which has simulated seven segment displays and keyboard buttons. For this eercise we will be using one of the seven segment displays. The objective of this exercise is to display a rotating pattern on the seven segment device as shown below The Digital Lab Sim tool can be opened via the "Toos menu (Tools Digital Lab Sim). The seven segment displays are memory-mapped output devices This means that they are each associated with an address in memory, and writing to that address wil control their state. The display that we will be using is mapped to address QFFFOo10. Each bit in the byte of memony that is assocated with the display will control one segment of the seven segment display. For example, writing the 8-bit binary vallue 00000001 to address OxFFFF0010 in memory wil turn on the top segment of the display. Writing 00000010 will turn on the top right segment, 00000100 the bottom right segment, and so on Skeleton code(labe_1.asm) has been provided for you on Moodle.The code will continuously write to the seven segment display to turn on the top segment. Inspect the code and how it works, and then add your own code to complete the exercise. Note: Before rnunning the code, make sure to open the Digital Lab Sim (ToolsDigital Lab Sim) and click the "Connect to MIPs" button (see below left).You can slow down the speed at which instructions get executed by using the "Run speed slider at the top of the program window (see below right) Hint: Using a shift instruction will simplify the code required to complete this task Digital Lab Sim 8.8 Run speed 20 instsec Exercise 1 - Rotating Seven Segment Display Pattern MARS comes packaged with a number of add-on peripheral device simulators One of them is the Digital Lab Sim, which has simulated seven segment displays and keyboard buttons. For this eercise we will be using one of the seven segment displays. The objective of this exercise is to display a rotating pattern on the seven segment device as shown below The Digital Lab Sim tool can be opened via the "Toos menu (Tools Digital Lab Sim). The seven segment displays are memory-mapped output devices This means that they are each associated with an address in memory, and writing to that address wil control their state. The display that we will be using is mapped to address QFFFOo10. Each bit in the byte of memony that is assocated with the display will control one segment of the seven segment display. For example, writing the 8-bit binary vallue 00000001 to address OxFFFF0010 in memory wil turn on the top segment of the display. Writing 00000010 will turn on the top right segment, 00000100 the bottom right segment, and so on Skeleton code(labe_1.asm) has been provided for you on Moodle.The code will continuously write to the seven segment display to turn on the top segment. Inspect the code and how it works, and then add your own code to complete the exercise. Note: Before rnunning the code, make sure to open the Digital Lab Sim (ToolsDigital Lab Sim) and click the "Connect to MIPs" button (see below left).You can slow down the speed at which instructions get executed by using the "Run speed slider at the top of the program window (see below right) Hint: Using a shift instruction will simplify the code required to complete this task Digital Lab Sim 8.8 Run speed 20 instsec
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