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
Blizzard [7]
3 years ago
13

Write a new ARMv8 assembly file called "lab04b.S" which is called by your main function. It should have the following specificat

ions: Create a function that computes factorials: n! = n · (n − 1) · ... · 3 · 2 · 1. Use the my_mul function in question 1 for all multiplications Use the concept of recursion. Do NOT directly use the concept of iteration. Do not forget that using the recursion is the same as using the STACK. Make sure you comment on the code. Demonstrate your code running to the TA. Turn in your lab04b.S file here when complete.
Engineering
1 answer:
Len [333]3 years ago
6 0

Answer:

my_mul:

.globl my_mul

my_mul:

   //Multiply X0 and X1

   //   Does not handle negative X1!

   //   Note : This is an in efficient way to multipy!

   SUB SP, SP, 16       //make room for X19 on the stack

   STUR X19, [SP, 0]    //push X19

   ADD X19, X1, XZR     //set X19 equal to X1

   ADD X9 , XZR , XZR //set X9 to 0

mult_loop:

   CBZ X19, mult_eol

   ADD X9, X9, X0

   SUB X19, X19, 1

   B mult_loop

mult_eol:

   LDUR X19, [SP, 0]

   ADD X0, X9, XZR      // Move X9 to X0 to return

   ADD SP, SP, 16       // reset the stack

   BR X30

Explanation:

You might be interested in
6. What types of injuries can occur in an electronics lab and how can they be prevented?
marysya [2.9K]

Answer:

The most common injuries in a chemistry lab is making a fire, heat burns, chemical burns, cuts and scrapes, contamination, inhalation, and spills and breaks.

1.) You can prevent making a fire by making sure you close and seal flammable materials.

2.) You can prevent heat burns by teaching the students how to properly use tongs,water baths, and other cooling equipment. 

3.) You can prevent chemical burns by treating the chemicals with caution, measure carefully, and use the approved containers.

4.) You can prevent cuts and scrapes by telling the students how to use the blades safely, and also when they are disposing broken or sharp items they should know how to wrap them up so no one else will get hurt. 

5.) You can prevent contamination by washing your hands, protect their clothing and skin with a lab coat or a lab apron, gloves and glasses, and cleaning your area where the germs of the chemicals were so no one will become.

6.) You can prevent inhalation by opening up windows, using ventilation fans, and using an equipment that measures the amount of gas emission in a room.

7.) Finally, you can prevent spills and breaks by telling the students what will happen if anything spills, and tell them to clean up.  

8 0
3 years ago
A smooth sphere with a diameter of 6 inches and a density of 493 lbm/ft^3 falls at terminal speed through sea water (S.G.=1.0027
Pachacha [2.7K]

Given:

diameter of sphere, d = 6 inches

radius of sphere, r = \frac{d}{2} = 3 inches

density,  \rho} = 493 lbm/ ft^{3}

S.G = 1.0027

g = 9.8 m/ m^{2} = 386.22 inch/ s^{2}

Solution:

Using the formula for terminal velocity,

v_{T} = \sqrt{\frac{2V\rho  g}{A \rho C_{d}}}              (1)

(Since, m = V\times \rho)

where,

V = volume of sphere

C_{d} = drag coefficient

Now,

Surface area of sphere, A = 4\pi r^{2}

Volume of sphere, V = \frac{4}{3} \pi r^{3}

Using the above formulae in eqn (1):

v_{T} = \sqrt{\frac{2\times \frac{4}{3} \pir^{3}\rho  g}{4\pi r^{2} \rho C_{d}}}

v_{T} = \sqrt{\frac{2gr}{3C_{d}}}  

v_{T} = \sqrt{\frac{2\times 386.22\times 3}{3C_{d}}}

Therefore, terminal velcity is given by:

v_{T} = \frac{27.79}{\sqrt{C_d}} inch/sec

3 0
3 years ago
Supercharged engine what it does to the car
geniusboy [140]

Answer:

A supercharger is an air compressor that increases the pressure or density of air supplied to an internal combustion engine. This gives each intake cycle of the engine more oxygen, letting it burn more fuel and do more work, thus increasing power.

Explanation:

3 0
3 years ago
Read 2 more answers
how are the construction steps for bisecting an angle similar to the steps you would have taken to construct and bisect a line s
GREYUIT [131]

Answer:

does the question entail anything else?

Explanation:

5 0
2 years ago
Which manufacturing process can create complex solid objects of metal such as the one shown in the image
Cerrena [4.2K]
Casting is the correct answer
8 0
2 years ago
Read 2 more answers
Other questions:
  • What is centrifugal force with respect to unbalance? What is the formula used to determine centrifugal force?
    12·1 answer
  • 3. Suppose you work for this company that evaluates Boolean circuits in exponential time. Since you are very smart, your manager
    12·1 answer
  • A double-pane insulated window consists of two 1 cm thick pieces of glass separated by a 1.8 cm layer of air. The window measure
    7·1 answer
  • Some connecting rods have ____ to help lubricate the cylinder wall or piston pin.
    12·2 answers
  • The electron beam in a TV picture tube carries 1015 electrons per second. As a design engineer, determine the voltage needed to
    8·1 answer
  • 8. Which of the following is a characteristic of no-till farming?
    8·1 answer
  • Consider a steady-state experiment in which the observed current due to reduction of Ox to R is 85 mA/cm2. What is the concentra
    12·1 answer
  • Which is not required when working in a manufacturing facility?
    10·1 answer
  • What are the success factors for mechanical engineering?
    8·2 answers
  • What is the command this line of code is telling the robot?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!