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]
4 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]4 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
As the junior engineer at the Mesabi Range Hydraulic Engineering Company located in Ely, Minnesota, you have been tasked with de
katen-ka-za [31]

yes it will

Explanation:

5 0
4 years ago
To solve the problem, make assumptions for missing data and justify. Given:
finlep [7]

Answer:

5,4,1, this is a explication

6 0
3 years ago
Consider a cubic crystal with the lattice constant a. Complete the parts (a)-(c) below. (a) Sketch the crystallographic planes w
Anna [14]

Answer:

(a) See attachment

(b) The two planes are parallel because the intercepts for plane [220] are X = 0,5 and Y = 0,5 and for plane [110] are X = 1 and Y = 1. When the planes are drawn, they keep the same slope in a 2D plane.

(c) d = \frac{a}{\sqrt{h^{2} + k^{2} + l^{2}}} = \frac{1}{\sqrt{2}} =   0,707

Explanation:

(a) To determine the intercepts for an specific set of Miller indices, the reciprocal intercepts are taken as follows:

For [110]

X = \frac{1}{1} = 1; Y = \frac{1}{1} = 1; Z = \frac{1}{0} = \inf.

For [220]

X = \frac{1}{2} = 0,5;Y = \frac{1}{2} = 0,5;Z = \frac{1}{0} = \inf.

The drawn of the planes is shown in the attachments.

(b) Considering the planes as two sets of 2D straight lines with no intersection to Z axis, then the slope for these two sets are:

For (1,1):

K_1 = \frac{1}{1} = 1

For (0.5, 0.5):

K_2 = \frac{0.5}{0.5} = 1

As shown above, the slopes are exactly equal, then, the two straight lines are considered parallel and for instance, the two planes are parallel also.

(c) To calculate the d-spacing between these two planes, the distance is calculated as follows:

The Miller indices are already given in the statement. Then, the distance is:

\frac{1}{d^{2}} = \frac{h^{2} + k^{2} + l^{2}}{a^{2}}

d = \frac{a}{\sqrt{h^{2} + k^{2} + l^{2}}} = \frac{1}{\sqrt{2}} =   0,707

7 0
3 years ago
A sample of wastewater is diluted 10 times. The diluted solution has an ultimate biochemical oxygen demand (BOD), Lo, of 30 mg/L
zzz [600]

Answer:

474.59 mg/L

Explanation:

Given that

BOD = 30 mg/L

Original BOD  = 30 mg/L × dilution factor

Original BOD  = 30 mg/L  × 10 = 300 mg/L

L_o = \frac{BOD}{1-e^{-5t}}

here L_o is the ultimate BOD ; BOD is the  biochemical oxygen demand ;  t = 0.20 /day

L_o = \frac{300}{1-e^{-5(0.20)}}

L_o = 474.59 \ mg/L

3 0
4 years ago
1. Technician A says that an automotive
Mrrafil [7]

Answer:

DNeither A nor B.

onefits of

Explanation:

3 0
4 years ago
Other questions:
  • A fluid has a dynamic viscosity of 0.048 Pa.s and a specific gravity of 0.913. For the flow of such a fluid over a flat solid su
    10·1 answer
  • REM rebound involves the A) tendency for REM sleep periods to become increasingly longer and more frequent as a normal night of
    15·1 answer
  • Hey, I have a question, I was thinking that if you have engineering skills or drawing skill you could help me to start a project
    15·1 answer
  • Select all of the true statements.
    14·1 answer
  • What is an isochoric process? b) Can heat be exchanged in an isochoric process? c) A 100L container holding an ideal gas at an i
    11·1 answer
  • Local technology is foundation for modern technology? justufy this statement with example.​
    12·1 answer
  • A force of 16,000 will cause a 1 1 bar of magnesium to stretch from 10 to 10.036 . Calculate the modulus of elasticity in . (Ent
    6·1 answer
  • 3.24 Program: Drawing a half arrow (Java) This program outputs a downwards facing arrow composed of a rectangle and a right tria
    6·1 answer
  • The first electricity producing wind turbine was invented in what year?*
    6·1 answer
  • 1. Which of these materials is the strongest?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!