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
Calculate the viscosity(dynamic) and kinematic viscosity of airwhen
nikitadnepr [17]

Answer:

(a) dynamic viscosity = 1.812\times 10^{-5}Pa-sec

(b) kinematic viscosity = 1.4732\times 10^{-5}m^2/sec

Explanation:

We have given temperature T = 288.15 K

Density d=1.23kg/m^3

According to Sutherland's Formula  dynamic viscosity is given by

{\mu} = {\mu}_0 \frac {T_0+C} {T + C} \left (\frac {T} {T_0} \right )^{3/2}, here

μ = dynamic viscosity in (Pa·s) at input temperature T,

\mu _0= reference viscosity in(Pa·s) at reference temperature T0,

T = input temperature in kelvin,

T_0 = reference temperature in kelvin,

C = Sutherland's constant for the gaseous material in question here C =120

\mu _0=4\pi \times 10^{-7}

T_0 = 291.15

\mu =4\pi \times 10^{-7}\times \frac{291.15+120}{285.15+120}\times \left ( \frac{288.15}{291.15} \right )^{\frac{3}{2}}=1.812\times 10^{-5}Pa-swhen T = 288.15 K

For kinematic viscosity :

\nu = \frac {\mu} {\rho}

kinemic\ viscosity=\frac{1.812\times 10^{-5}}{1.23}=1.4732\times 10^{-5}m^2/sec

3 0
3 years ago
Select the correct answer. Which existing technology did engineers use to enhance the speed of propeller-driven airplanes
Musya8 [376]

metallurgy:

Explanation:

7 0
2 years ago
PLEASE HURRY!!!
Naily [24]

Answer:

A

Explanation:

He should get a job in engineering to see what it's like to work in the field.

3 0
2 years ago
Read 2 more answers
Create a series of eight successive displacements that would program a robot to move in an octagonal path that is as close as yo
Komok [63]

Answer:

bts biot bts biot jungkukkk

jungkukkkbiot

Explanation:

bts biot bts biot jungkukkk

jungkukkkbiot

5 0
3 years ago
What are the main differences between pipefitters and plumbers? (Select all that apply.)
romanna [79]

Answer:

pipefitters design systems whereas plumbers maintain systems

8 0
2 years ago
Other questions:
  • What is the difference between a job and a profession
    9·1 answer
  • Which of the following has nothing to do with insulating glass? Group of answer choices
    10·2 answers
  • A(n) _________ is a current greater than the equipment rated current or conductor ampacity, which is confined to the normal cond
    12·1 answer
  • Torque is a twisting force. If the required torque applied on a 3 ft wrench is 45 ft·lb, what is the force that must be applied?
    5·1 answer
  • What is the mass of a brass axle that has a volume of 0.318 cm? ​
    6·1 answer
  • An open vat in a food processing plant contains 500 L of water at 20°C and atmospheric pressure. If the water is heated to 80°C,
    9·1 answer
  • Component(s) that only allow(s) electrons to flow in one direction. Mark all that apply
    15·1 answer
  • Everyone has only one learning style. True or false? hurry pleasle this exp carees class
    11·1 answer
  • Difference between star and delta connection​
    10·2 answers
  • What do we need to do to get CO2 emissions all the way to zero?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!