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
QUESTION:
pentagon [3]
74 cycles it’s what u need
7 0
3 years ago
At 45° latitude, the gravitational acceleration as a function of elevation z above sea level is given by g = a − bz , where a =
Ahat [919]

Answer:

8861.75 m approximately 8862 m

Explanation:

We need to remember Newton's 2nd Law which says that the force experienced by an object is proportional to his acceleration and that the constant of proportionality between those two vectors correspond to the mass of the object.

F=ma for the weight of an object (which is a force) we have that the acceleration experienced by that object is equal to the gravitational acceleration, obtaining that  W = mg

For simplicity we work with g =9.807 \frac{m}{s^{2}} despiting the effect of the height above sea level. In this problem, we've been asked by the height above sea level that makes the weight of an object 0.30% more lighter.

In accord with the formula g = a-bz the "normal" or "standard" weight of an object is given by W = mg = ma when z = 0, so we need to find the value of z that makes W = m(a-bz) = 0.997ma meaning that the original weight decrease by a 0.30%, so now we operate...

m(a-bz) = 0.997ma now we group like terms on the same sides ma(1-0.997) = mbz we cancel equal tems on both sides and obtain that z = \frac{a}{b} (0.003) = \frac{9.807 \frac{m}{s^{2} } }{3.32*10^{-6} s^{-2} } (0.003) = 8861.75 m

7 0
3 years ago
What is the effect of the workpiece specific cutting energy on the cutting forces, and why?
ella [17]

Explanation:

Specific cutting energy:

   It the ratio of power required to cut the material to metal removal rate of material.If we take the force required to cut the material is F and velocity of cutting tool is V then cutting power will be the product of force and the cutting tool velocity.

Power P = F x V

Lets take the metal removal rate =MRR

Then the specific energy will be

    sp=\dfrac{F\times V}{MRR}

If we consider that metal removal rate and cutting tool velocity is constant then when we increases the cutting force then specific energy will also increase.

8 0
4 years ago
5. Consider the LTI system defined by the differential equation (a) Draw the pole-zero plot for the system. Is the system stable
stealth61 [152]

Answer:

Detailed solution is attached in the images below showing step wise solution and answer for each part individually.

8 0
3 years ago
What is the voltage output (in V) of a transformer used for rechargeable flashlight batteries, if its primary has 515 turns, its
kow [346]
<h2>Answer:</h2>

7532V

<h2>Explanation:</h2>

For a given transformer, the ratio of the number of turns in its primary coil (N_{p}) to the number of turns in its secondary coil (N_{s}) is equal to the ratio of the input voltage (V_{p}) to the output voltage (V_{s}) of the transformer. i.e

\frac{N_p}{N_s} = \frac{V_p}{V_s}            ----------------(i)

<em>From the question;</em>

N_{p} = number of turns in the primary coil = 8 turns

N_{s} = number of turns in the secondary coil = 515 turns

V_{p} = input voltage = 117V

<em>Substitute these values into equation (i) as follows;</em>

\frac{8}{515} = \frac{117}{V_s}

<em>Solve for </em>V_{s}<em>;</em>

V_{s} = 117 x 515 / 8

V_{s} = 7532V

Therefore, the output voltage (in V) of the transformer is 7532

6 0
3 years ago
Other questions:
  • A construction manager is looking for workers to build a series of walkways within a large garden apartment. What type of workme
    12·1 answer
  • I need answers for this sheet please.
    15·1 answer
  • Tech A says that in some cases, the electronic brake control module can be programmed with a new tire size to restore proper ele
    7·1 answer
  • An equal-tangent sag vertical curve (with a negative initial and a positive final grade) is designed for 55 mi/h. The PVI is at
    5·1 answer
  • Which is not required when working in a manufacturing facility?
    10·1 answer
  • When the Moon is in the position shown, how would the Moon look to an observer on the North Pole?
    11·1 answer
  • Writing an excellent problem statement will not help guide you through the rest of the process and steer you towards the BEST so
    8·1 answer
  • What does it mean to test a hypothesis?
    13·1 answer
  • A continuous function y = ƒ(x) is known to be negative at x = 0 and positive at x = 1. Why does the equation ƒ(x) = 0 have at le
    14·1 answer
  • Which type of Artificial Intelligence (AI) can repeatedly perform tasks of limited scope?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!