1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Dvinal [7]
3 years ago
15

Write a function (subroutine) that inputs a data value in register r0 and returns value in r0. The function returns y 5 a 1 bx 1

cx2, where a, b, and c are parameters built into the function (i.e., they are not passed to it). The subroutine also performs clipping. If the output is greater than a value d, it is constrained to d (clipped). The input in r0 is a positive binary value in the range 0 to 0xFF. Apart from r0, no other registers may be modified by this subroutine. Write ARM code to implement the following C operation.
Int s=0;
for ( i = 0; i < 10; i++) { s = s + i*i;)
Computers and Technology
1 answer:
umka2103 [35]3 years ago
5 0

Solution :

  int f(int x){

      \text{return a + b*x +c*x*x};

  }*/

  int f(\text{int R0}){

      int stack[2] = {\text{R1,R2}};

      \text{R1 = R0};

      \text{R1 = R1}\times \text{ R1};

      \text{R2 = C};

      R1 = R1 * C; /*R1 = cx^2*/

      \text{R2 = B};

      \text{R0 = R0} * R2; /* R0 = bx */

      \text{R0 = R0 + R1}; /*R0 = bx + cx^2 */

      \text{R2 = C};

      \text{R0 = R0 + R2}; /*R0 = a+bx+cx^2 */

      \text{R1 = stack[0];}

     \text{ R2 = stack[1];}

     \text{ return R0;}

  }

  /*\text{ARM code to implement the following C operation}

  int s=0;

  \text{for ( i = 0; i < 10; i++)}

  { \text{s = s + i } \times i;)

  */

          AREA SumSquares, code, readWrite

          ENTRY

          \text{MOV r0, #0}        ;loop \text{ counter i present at 0}

          MOV r1, #0       ; s = 0

  Loop   \text{MUL r2, r0, r0}   ;calculate i*i

          \text{ADD r1, r1, r2}   ;s = s+ i*i

          \text{ADDS r0, r0}, #1   ; i = i+1

          \text{CMP r0},#10       ; test for end

          \text{BNE} Loop        ; \text{continue until all added}

          END

You might be interested in
Series-connected 11-pF and 21-pF capacitors are placed in parallel with series-connected 22- pF and 30-pF capacitors. Determine
Naya [18.7K]

Answer:

19.9 pF

Explanation:

Given that:

Series connection :

11pF and 21pF

C1 = 11pF ; C2 = 21pF

Cseries = (C1*C2)/ C1 + C2

Cseries = (11 * 21) / (11 + 21)

Cseries = 7.21875 pF

C1 = 22pF ; C2 = 30pF

Cseries = (C1*C2)/ C1 + C2

Cseries = (22 * 30) / (22 + 30)

Cseries = 12.6923 pF

Equivalent capacitance is in parallel, thus,

7.21875pF + 12.6923 pF = 19.91105 pF

= 19.9 pF

8 0
3 years ago
Describe Atari and explain how the level of technology available at the time impacted the development of Atari game systems
Gelneren [198K]

Answer:

Atari is something that is dangerous .

has led to many bad things to the young ones

4 0
3 years ago
What is local area network​
otez555 [7]

Explanation:

local area network is a computer network that interconnects computers within a limited area such as a residence, school, laboratory, university campus or office building. By contrast, a wide area network not only covers a larger geographic distance, but also generally involves leased telecommunication circuits.

<em><u>hope</u></em><em><u> </u></em><em><u>it</u></em><em><u> </u></em><em><u>helps</u></em>

3 0
3 years ago
Read 2 more answers
Laura is in the middle of making a presentation. On one slide, she includes a heading, three subheadings, and three bullet point
Nat2105 [25]

The first one us d....


6 0
3 years ago
Read 2 more answers
On an ssd, a dashed arrow usually represents what?​
levacccp [35]
SSD stands for system sequence diagrams. SSd diagrams <span>model the interactions between objects in a single use case and illustrate how the different parts of a </span>system<span> interact with each other </span>
On an SSD, a dashed arrow usually represents an object. SSD <span>depicts the </span>objects<span> and classes involved in the scenario and the </span>sequence<span> of messages exchanged between the </span><span>objects.</span>
4 0
3 years ago
Other questions:
  • Blender questions
    6·1 answer
  • An example of live footage is when?
    10·2 answers
  • Create the Following Menu in a loop so the menu will continually show until the user chooses to exit.AddMultiplyExitAdd a value
    10·1 answer
  • What type of cable would you use to connect two hosts together in a back-to-back configuration using twisted pair cable?
    15·1 answer
  • Linda is the education manager for a national coding service company. Once a month she holds a videoconference with all her codi
    14·1 answer
  • What is Human Dignity
    12·1 answer
  • It's fill the gap homework
    7·1 answer
  • You’re having trouble connecting to the Internet so you call your Internet service provider for help. They need to know the perm
    15·1 answer
  • A palindrome is a string that reads the same from left to right and from right to left. Design an algorithm to find the minimum
    15·1 answer
  • SOMEONE PLEASE HELP ME WITH THIS ILL GIVE YOU BRAINLY IF YOU GET IT RIGHT PLEASE!!!!!
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!