Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4. Assuming x is in R1, y in R2, z in R3 and the result in RO, write and test an ARM assembly language program

image text in transcribed

4. Assuming x is in R1, y in R2, z in R3 and the result in RO, write and test an ARM assembly language program to evaluate the following expressions:| (a) 3* x2 + 5* x [7] (b) 2 * x2 +6*x*y+3+ y2 [9] (c) x3 4* x2 + 3* x + 8 [8] (d) 3* x* - 5* x 16 * y* * 24 [9] 2 Page Using the assembly source code below as a starting point, modify the code to include code that solves all four problems. Test your code by setting x = 5, y = 6 and z=2. AREA MyCode, CODE, READONLY ENTRY ; start of code LDR R1, =5 LDR R2, =6 ; x = 5 ; y = 6 ; compute x*x + y + 4 (35 or 0x23) MUL RO, R1, R1 ADD RO, RO, R2 ADD RO, RO, #4 ; RO = x*x ; RO = x*x + y x*x + y + 4 ; RO = i ; add your code here i LBL ; infinite loop to end programme END

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

Step: 3

blur-text-image

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

What are Decision Trees?

Answered: 1 week ago

Question

What is meant by the Term Glass Ceiling?

Answered: 1 week ago