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
At steady state, air at 200 kPa, 330 K, and mass flow rate of 0.1 kg/s enters an insulated duct having differing inlet and exit
olya-2409 [2.1K]

Answer:

Photos are attached. Step wise solution is given.

1. Velocity of air at inlet is calculated.

2.Temperature of air at exit in Kelvin is also calculated.

3.Exit Cross-Sectional area

Best Regards.

5 0
4 years ago
a valueable preserved biological specimen is weighed by suspeding it from a spring scale. it weighs 0.45 N when it is suspendedi
Dmitry_Shevchenko [17]

Answer:

ρ=962.16kg/m^3

Explanation:

The first thing we must do to solve is to find the mass of the specimen using the weight equation

w = mg

m=w/g

m=0.45/9.81=0.04587kg

To find the volume we must make a free-body diagram on the specimen, taking into account that the weight will go down and the buoyant force up, and the result of that subtraction will be the measured weight value (0.081N).

We must bear in mind that the principle of archimedes indicates that the buoyant force is given by

F = ρgV

where V is the specimen volume and  ρ is the density of alcohol = 789kg / m ^ 3

considering the above we have the following equation

0.081=0.45-(789)(9.81m/s^2)V

solving for V

V=(0.081-0.45)/(-789x9.81)

V=4.7673x10^-5m^3

finally we found the density

ρ=m/v

ρ=0.04587kg/4.7673x10^-5m^3

ρ=962.16kg/m^3

4 0
4 years ago
A 0.4-W cylindrical electronic component with diameter 0.3 cm and length 1.8 cm and mounted on a circuit board is cooled by air
Katyanochek1 [597]

Answer:

The surface temperature of the component 54.6 degrees celsius.

Explanation:

Please see attachment.

7 0
3 years ago
A manufacturing process that unintentionally introduces cracks to the surface of a part was used to produce load-bearing compone
ElenaW [278]
You connect the motherboard to the astronomical blow up device
5 0
3 years ago
Question 11 (1 point)
kirill115 [55]

Answer:

  False

Explanation:

Bella counts products in finished goods inventory and she counts kits in various stages of manufacturing.

4 0
3 years ago
Other questions:
  • Code scramble: make the program sort the three numbers x, y and z into increasing order, so that x has the smallest value, y has
    8·1 answer
  • Hi, any kind of help on these questions will be appreciated.
    10·1 answer
  • 4. The friction point is the point
    12·1 answer
  • Ball Throws
    11·1 answer
  • The uniform crate has a mass of 50 kg and rests on the cart having an inclined surface. Determine the smallest acceleration that
    10·1 answer
  • Scenario: You and three of your friends decide to hike the Appalachian Trail, a 2175-mile trail running from Georgia to Maine, s
    11·1 answer
  • The pressure distribution over a section of a two-dimensional wing at 4 degrees of incidence may be approximated as follows: Upp
    14·1 answer
  • What are the general principles of DFA? What are the steps to minimize the number of parts for an assembly?
    14·1 answer
  • 1. Given: R= 25 , E = 100 V<br> Solve for I
    5·1 answer
  • To check for ripple voltage from the alternator, connect a digital multimeter and select
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!