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
Which of the following best describes the purpose of child labor laws?
BabaBlast [244]

Answer:

Are there supposed to be answer choices with this question?

Child labor laws are basically laws placing restrictions and regulations on the work of minors.

6 0
3 years ago
Read 2 more answers
What type of information is appropriate for headers and footers? Check all that apply.
lbvjy [14]

Answer:

slide/page number

smart art

maybe date and time

Explanation:

6 0
3 years ago
Read 2 more answers
What is mark in in premiere pro
Studentka2010 [4]
Markers are an often underutilized tool in the Premiere Pro CC toolbox. They are little colored tabs you can apply to both your timeline and your source clips to indicate important points in time with a color or note.
5 0
3 years ago
Compter History Large Resume Include: the beginnings of the computer and its development during the years The events of computer
NikAS [45]

Answer:

The development of computers from the beginning to what we see now is called the computer generations. It is gradual advancement in the technology in the making of the computer.

Explanation:

The generation in computer technology can be defined as the development or the change in the technology in the computer as it was used. There were  five generations of computer development. They were :

1. First Generation computers

   In this generation, vacuum tubes was used in the circuits. It dated from 1946 to 1959.

2. Second Generation computers

  These are transistors based computers. This generation ranges from 1959 to 1965.

3. Third Generation computers  

    This generation computers were Integrated circuit based. The generation stared in 1965 and ended in 1971.

4. Fourth Generation computers

   The computers of this generation used VLSI microprocessor in the circuits. The period of the 4th generation computers are from 1971 to 1980.

5. Fifth Generation computers

   The computers of this generation used ULSI microprocessor in the circuits. The 5th generation computers started from 1980s.

4 0
3 years ago
What types of forecast worksheets are available in Excel? Check all that apply.
Oksana_A [137]

Answer:

C, D

Explanation:

ya welcome:)

5 0
3 years ago
Read 2 more answers
Other questions:
  • Consider what fact-finding techniques you would use to identify the important facts needed to develop a database system. Please
    7·1 answer
  • Is it possible to do Agile project in Waterfall methodology?
    11·2 answers
  • Write a program that allows the user to play a guessing game. The game will choose a "secret number", a positive integer less th
    14·1 answer
  • Which two technologies support the building of single-page applications? and are two technologies helpful in building single pag
    12·1 answer
  • Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an in
    13·1 answer
  • "Save" or "save as" can be used interchangeably and have no unique features.<br> True<br> False
    12·2 answers
  • "Packet switches have multiple links attached to them. For each attached link the packet switch has a/an ____________, which sto
    7·1 answer
  • A RISC processor has 186 total registers, with 18 global registers. There are 12 register windows, each with 10 locals. How many
    5·1 answer
  • I need help so bad it’s the entire test for EdHesive python coding Test 2
    5·1 answer
  • Please help me on this match all this up i’ll give you brainlist
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!