The code displayed in Figure 1 implements a program that sets the content of a memory array
Fantastic news! We've Found the answer you've been seeking!
Question:
The code displayed in Figure 1 implements a program that sets the content of a memory array with a sequence of values. This program is useful for initializing the memory with specific values. Figure 2 shows the assembled program in the ARMSim simulator. Try to simulate the program in your mind instruction by instruction and answer the questions below. You can also download the program at
iLearn -> References -> ARMSim -> A2.s and simulate it in ARMSim to verify your answer.
Transcribed Image Text:
11 12 13 14 15 22288285855 21 16 17 18 19 20 loop: 23 24 8------Assembler Directives-- Data Variables 26 .DATA Values: .WORD 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 8 the values to be stored in the memory array .EQU M, 0x00002000 M is the beginning address of the memory array 8 Code .TEXT ------End of Assembler Directives-- Start: LDR R1, -M LDR RO, Values MOV R3, #6 8R3 is a parameter which holds the value of the number of entries in the memory array BL men set @branch to subroutine mem_set to set the content of the memory array SWI 0x11 @stop program execution 8 set the content of the memory array @clear R4 MOV RA, #0 LDR R2, [RO], #4 STR R2, [R1], # ADDS R4, R1, #1 CMP R4, R3 BMI loop BX LR A2. 00001034: 00001014: Assembler Directives▪▪▪▪▪ Data Variables .DATA Values: WORD 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 EQU M, 0x00002000 00001000:E3A01A02 Start: LDR R1, M 00001004:E59F0024 LDR 00001008:E3A03006 MOV 0000100C:EB000000 00001010:EF000011 00001024:E1540003 00001028:4AFFFFFA 0000102C:E12FFF1E Code .TEXT End of Assembler Directives-- BL SWI mem_set: 00001014:E3A04000 MOV 00001018:E4902004 loop: LDR 0000101C:E4812004 00001020:2944001 STR ADDS CMP BMI BX RO, -Values R3, #6 mem_set 0x11 R4, #0 R2, [RO], #4 R2, [R1], #4 R4, R4, #1 R4, R3 loop LR the values to be stored in the memory array ⓇM is the beginning address of the memory array @R3 is a parameter which holds the value of the number of entries in the memory array branch to subroutine mem_set to set the content of the memory array stop program execution @set the content of the memory array @clear R4 11 12 13 14 15 22288285855 21 16 17 18 19 20 loop: 23 24 8------Assembler Directives-- Data Variables 26 .DATA Values: .WORD 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 8 the values to be stored in the memory array .EQU M, 0x00002000 M is the beginning address of the memory array 8 Code .TEXT ------End of Assembler Directives-- Start: LDR R1, -M LDR RO, Values MOV R3, #6 8R3 is a parameter which holds the value of the number of entries in the memory array BL men set @branch to subroutine mem_set to set the content of the memory array SWI 0x11 @stop program execution 8 set the content of the memory array @clear R4 MOV RA, #0 LDR R2, [RO], #4 STR R2, [R1], # ADDS R4, R1, #1 CMP R4, R3 BMI loop BX LR A2. 00001034: 00001014: Assembler Directives▪▪▪▪▪ Data Variables .DATA Values: WORD 0x11, 0x22, 0x33, 0x44, 0x55, 0x66 EQU M, 0x00002000 00001000:E3A01A02 Start: LDR R1, M 00001004:E59F0024 LDR 00001008:E3A03006 MOV 0000100C:EB000000 00001010:EF000011 00001024:E1540003 00001028:4AFFFFFA 0000102C:E12FFF1E Code .TEXT End of Assembler Directives-- BL SWI mem_set: 00001014:E3A04000 MOV 00001018:E4902004 loop: LDR 0000101C:E4812004 00001020:2944001 STR ADDS CMP BMI BX RO, -Values R3, #6 mem_set 0x11 R4, #0 R2, [RO], #4 R2, [R1], #4 R4, R4, #1 R4, R3 loop LR the values to be stored in the memory array ⓇM is the beginning address of the memory array @R3 is a parameter which holds the value of the number of entries in the memory array branch to subroutine mem_set to set the content of the memory array stop program execution @set the content of the memory array @clear R4
Expert Answer:
Answer rating: 100% (QA)
1 The beginning address of the word list Values is 0000... View the full answer
Related Book For
Corporate Finance
ISBN: 978-0077861759
10th edition
Authors: Stephen Ross, Randolph Westerfield, Jeffrey Jaffe
Posted Date:
Students also viewed these programming questions
-
This problem is useful for testing the ability of financial calculators and computer software. Consider the following cash flows. How many different IRRs are there? Year Cash Flow 0 ......... -$...
-
This problem is useful for testing the ability of financial calculators and computer software. Consider the following cash flows. How many different IRRs are there? Search between 20 percent and 70...
-
This problem is useful for testing the ability of financial calculators and spreadsheets. Consider the following cash flows. How many different IRRs are there? When should we take this project? Year...
-
If the resultant force acting on the hook is F R = {? 200i + 800j + 150k} lb, determine the magnitude and coordinate direction angles of F. 30 F= 600 ib
-
Consider the system of equations a. Substitute the y-value from Equation 1 into Equation 2 to obtain a new equation. Solve the new equation for x. b. Subtract Equation 2 from Equation 1 and solve for...
-
Why do managers struggle with ethics when it comes to making strategic management decisions for their organization?
-
"If the two bodies are in thermal equilibrium with a third body, they are also in thermal equilibrium with each other." This is known as the (a) First law of thermodynamics (b) Second law of...
-
Sendelbach Corporation is a U.S.-based organization with operations throughout the world. One of its subsidiaries is headquartered in Toronto. Although this wholly owned company operates primarily in...
-
You can turn your smartphone into a Wi-Fi analyzer by installing a free or inexpensive app through your phone's app store. These days, these apps are easy to find, easy to use, and provide useful...
-
Use a time series chart to display the data shown in the table. The table represents the percentages of the U.S. gross domestic product (GDP) that come from the manufacturing sector. Organize the...
-
Investigators measure the size of fog droplets using diffraction of light. A camera records the diffraction pattern on a screen as the droplets pass front of a laser, and a measurement of the size of...
-
A cannon is fired with muzzle velocity of 158 m/s at an angle of elevation = 46. Gravity = 9.8 m/s 2 . a) What is the maximum height the projectile reaches? b) What is the total time aloft? c) How...
-
3. Does your district have a person located at the school to lead the coordination of school and community partnerships? If so, what is the title of that person and what other jobs/duties is he or...
-
Pharoah Company entered into these transactions during May 2025, its first month of operations. 1. Stockholders invested $44,500 in the business in exchange for common stock of the company. 2....
-
Managers often use variance analysis in employee performance evaluations for the following two attributeseffectiveness and efficiency. Variance analysis alerts management to whether the organization...
-
Maria Santiago brought her daughter Jessica, age 17, to the office with the chief complaint as back pain. Maria indicates that Jessica was in a car accident 30 days ago while driving to school with...
-
Management desires a minimum balance of $10,000 at all times. If necessary, additional financing can be obtained at a 12% interest rate. Interest is paid at the time of repaying the loan principal....
-
SCHEDULE OF COST OF GOODS MANUFACTURED The following information is supplied for Sanchez Welding and Manufacturing Company. Prepare a schedule of cost of goods manufactured for the year ended...
-
Ecco Company has total fixed costs of $5,000, sells a product whose contribution margin is $50, and selling price per unit is $125, and has current sales of $15,000. The company's margin of safety...
-
Lone Star Industries just issued $235,000 of perpetual 8 percent debt and used the proceeds to repurchase stock. The company expects to generate $118,000 of earnings before interest and taxes in...
-
Why do firms issue convertible bonds and bonds with warrants?
-
Miller Manufacturing has a target debtequity ratio of .55. Its cost of equity is 14 percent, and its cost of debt is 7 percent. If the tax rate is 35 percent, what is Millers WACC?
-
Differentiate between live and dead centres of a lathe.
-
List the various lathe accessories.
-
Explain the working principal of a shaper.
Study smarter with the SolutionInn App