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
My name is Ann [436]
3 years ago
12

LC3 Programming ProblemUse .BLKW to set up an array of 10 values, starting at memory location x4000, as in lab 4.Now programmati

cally populate the array with the numbers 0 through 9 – i.e. hard-code just the firstvalue (0), then calculate the rest one at a time, storing them in the array as you go.After you've stored them all, grab the seventh value (which would be 6) and store it in R2.As always, step through your program and examine the values as they are stored in the array, andexamine the final value stored in R2, to make sure your program works as expected.
Engineering
1 answer:
irga5000 [103]3 years ago
7 0

Answer:

Check the explanation

Explanation:

Code

.ORIG x4000

;load index

LD R1, IND

;increment R1

ADD R1, R1, #1

;store it in ind

ST R1, IND

;Loop to fill the remaining array

TEST LD R1, IND

;load 10

LD R2, NUM

;find tw0\'s complement

NOT R2, R2

ADD R2, R2, #1

;(IND-NUM)

ADD R1, R1, R2

;check (IND-NUM)>=0

BRzp GETELEM

;Get array base

LEA R0, ARRAY

;load index

LD R1, IND

;increment index

ADD R0, R0, R1

;store value in array

STR R1, R0,#0

;increment part

INCR

;Increment index

ADD R1, R1, #1

;store it in index

ST R1, IND

;go to test

BR TEST

;get the 6 in R2

;load base address

GETELEM LEA R0, ARRAY

;Set R1=0

AND R1, R1,#0

;Add R1 with 6

ADD R1, R1, #6

;Get the address

ADD R0, R0, R1

;Load the 6th element into R2

LDR R2, R0,#0

;Display array contents

PRINT

;set R1 = 0

AND R1, R1, #0

;Loop

;Get index

TOP ST R1, IND

;Load num

LD R3,NUM

;Find 2\'s complement

NOT R3, R3

ADD R3, R3,#1

;Find (IND-NUM)

ADD R1, R1,R3

;repeat until (IND-NUM)>=0

BRzp DONE

;load array address

LEA R0, ARRAY

;load index

LD R1, IND

;find address

ADD R3, R0, R1

;load value

LDR R1, R3,#0

;load 0x0030

LD R3, HEX

;convert value to hexadecimal

ADD R0, R1, R3

;display number

OUT

;GEt index

LD R1, IND

;increment index

ADD R1, R1, #1

;go to top

BR TOP

;stop

DONE HALT

;declaring variables

;set limit

NUM .FILL 10

;create array

ARRAY .BLKW 10 #0

;variable for index

IND .FILL 0

;hexadecimal value

HEX .FILL x0030

;stop

.END

You might be interested in
Please answer fast. With full step by step solution.​
lina2011 [118]

Let <em>f(z)</em> = (4<em>z </em>² + 2<em>z</em>) / (2<em>z </em>² - 3<em>z</em> + 1).

First, carry out the division:

<em>f(z)</em> = 2 + (8<em>z</em> - 2) / (2<em>z </em>² - 3<em>z</em> + 1)

Observe that

2<em>z </em>² - 3<em>z</em> + 1 = (2<em>z</em> - 1) (<em>z</em> - 1)

so you can separate the rational part of <em>f(z)</em> into partial fractions. We have

(8<em>z</em> - 2) / (2<em>z </em>² - 3<em>z</em> + 1) = <em>a</em> / (2<em>z</em> - 1) + <em>b</em> / (<em>z</em> - 1)

8<em>z</em> - 2 = <em>a</em> (<em>z</em> - 1) + <em>b</em> (2<em>z</em> - 1)

8<em>z</em> - 2 = (<em>a</em> + 2<em>b</em>) <em>z</em> - (<em>a</em> + <em>b</em>)

so that <em>a</em> + 2<em>b</em> = 8 and <em>a</em> + <em>b</em> = 2, yielding <em>a</em> = -4 and <em>b</em> = 6.

So we have

<em>f(z)</em> = 2 - 4 / (2<em>z</em> - 1) + 6 / (<em>z</em> - 1)

or

<em>f(z)</em> = 2 - (2/<em>z</em>) (1 / (1 - 1/(2<em>z</em>))) + (6/<em>z</em>) (1 / (1 - 1/<em>z</em>))

Recall that for |<em>z</em>| < 1, we have

\displaystyle\frac1{1-z}=\sum_{n=0}^\infty z^n

Replace <em>z</em> with 1/<em>z</em> to get

\displaystyle\frac1{1-\frac1z}=\sum_{n=0}^\infty z^{-n}

so that by substitution, we can write

\displaystyle f(z) = 2 - \frac2z \sum_{n=0}^\infty (2z)^{-n} + \frac6z \sum_{n=0}^\infty z^{-n}

Now condense <em>f(z)</em> into one series:

\displaystyle f(z) = 2 - \sum_{n=0}^\infty 2^{-n+1} z^{-(n+1)} + 6 \sum_{n=0}^\infty z^{-n-1}

\displaystyle f(z) = 2 - \sum_{n=0}^\infty \left(6+2^{-n+1}\right) z^{-(n+1)}

\displaystyle f(z) = 2 - \sum_{n=1}^\infty \left(6+2^{-(n-1)+1}\right) z^{-n}

\displaystyle f(z) = 2 - \sum_{n=1}^\infty \left(6+2^{2-n}\right) z^{-n}

So, the inverse <em>Z</em> transform of <em>f(z)</em> is \boxed{6+2^{2-n}}.

4 0
3 years ago
Example – a 100 kW, 60 Hz, 1175 rpm motor is coupled to a flywheel through a gearbox • the kinetic energy of the revolving compo
rjkz [21]

Answer:

1200KJ

Explanation:

The heat dissipated in the rotor while coming down from its running speed to zero, is equal to three times its running kinetic energy.

P (rotor-loss) = 3 x K.E

P = 3 x 300 = 900 KJ

After coming to zero, the motor again goes back to running speed of 1175 rpm but in opposite direction. The KE in this case would be;

KE = 300 KJ

Since it is in opposite direction, it will also add up to rotor loss

P ( rotor loss ) = 900 + 300 = 1200 KJ

7 0
2 years ago
On aircraft equipped with fuel pumps, when is the auxiliary electric driven pump used?.
pochemuha
In an airplane equipped with fuel pumps, the auxiliary electric fuel pump is used in the event the engine-driven fuel pump fails.. hope this helped !
6 0
2 years ago
By adding "-once", one can form the noun form of the word "organize" is that true or false?​
denpristay [2]

Answer:

<h2>False </h2>

Explanation:

The noun form of organize is just adding letter r

7 0
2 years ago
Read 2 more answers
Steam at 20 bars is in the saturated vapor state (call this state 1) and contained in a pistoncylinderdevice with a volume of 0.
saul85 [17]

Answer:

Explanation:

Given that:

<u>At state 1:</u>

Pressure P₁ = 20 bar

Volume V₁ = 0.03 \mathbf{m^{3}}

From the tables at saturated vapour;

Temperature T₁ = 212.4⁰ C  ; v_1 = vg_1 = 0.0996 \mathbf{m^{3}} / kg

The mass inside the cylinder is m = 0.3 kg, which is constant.

The specific internal energy u₁ = ug₁ = 2599.2 kJ/kg

<u>At state 2:</u>

Temperature T₂ = 200⁰ C

Since the 1 - 2 occurs in an isochoric process v₂ = v₁ = 0.099 \mathbf{m^{3}} / kg

From temperature T₂ = 200⁰ C

v_f_2 = 0.0016 \ m^3/kg  

vg_2 = 0.127 \ m^3/kg  

Since  vf_2 < v_2 , the saturated pressure at state 2 i.e. P₂ = 15.5 bar

Mixture quality x_2 = \dfrac{v_2-vf_2}{vg_2 -vf_2}

x_2 = \dfrac{(0.099-0.0016)m^3/kg}{(0.127 -0.0016) m^3/kg}

x_2 = \dfrac{(0.0974)m^3/kg}{(0.1254) m^3/kg}

\mathsf{x_2 =0.78}

At temperature T₂, the specific internal energy u_f_2 = 850.6 \ kJ/kg , also ug_2 = 2594.3 \ kJ/kg

Thus,

u_2 = uf_2 + x_2 (ug_2 -uf_2)

u_2 =850.6  +0.78 (2594.3 -850.6)

u_2 =850.6  +1360.086

u_2 =2210.686 \ kJ/kg

<u>At state 3:</u>

Temperature T_3=T_2 = 200 ^0 C ,

V_3 = 2V_1 = 0.06 \ m^3

Specific volume v_3 = 0.2  \ m^3/kg

Thus; vg_3 =vg_2 = 0.127 \ m^3/kg ,

SInce v_3 > vg_3, therefore, the phase is in a superheated vapour state.

From the tables of superheated vapour tables; at v_3 = 0.2  \ m^3/kg and T₃ = 200⁰ C

The pressure = 10 bar and v =0.206 \ m^3/kg

The specific internal energy u_3 at the pressure of 10 bar = 2622.3 kJ/kg

The changes in the specific internal energy is:

u_2-u_1

= (2210.686 - 2599.2) kJ/kg

= -388.514 kJ/kg

≅ - 389 kJ/kg

u_3-u_2

= (2622.3 - 2210.686)  kJ/kg

= 411.614 kJ/kg

≅ 410 kJ/kg  

We can see the correct sketches of the T-v plot showing the diagrammatic expression in the image attached below.

3 0
3 years ago
Other questions:
  • Compute the estimated actual endurance limit for SAE 4130 WQT 1300 steel bar with a rectangular cross section of 20.0 mm by 60 m
    11·1 answer
  • 5. What are the 3 basic types of electrical circuits?
    12·1 answer
  • Which of the following statements about glycogen metabolism is FALSE?
    12·1 answer
  • Before you calculate the moment capacity for a steel beam, you have to determine the classification of beam.
    10·1 answer
  • The sports car has a weight of 4900 lblb and center of gravity at GG. If it starts from rest it causes the rear wheels to slip a
    13·1 answer
  • The cars of a roller-coaster ride have a speed of 30 km / h as they pass over the top of the circular track. Neglect any frictio
    9·1 answer
  • Define the Artist class in Artist.py with a constructor to initialize an artist's information. The constructor should by default
    7·1 answer
  • What are three automotive safety systems
    14·1 answer
  • 1. Which of these materials is the strongest?
    12·1 answer
  • One reason the shuttle turns on its back after liftoff is to give the pilot a view of the horizon. Why might this be useful?
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!