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
A tank with a volume of 8 m3 containing 4 m3 of 20% (by volume) NaOH solution is to be purged by adding pure water at a rate of
lawyer [7]

Answer:

The time necessary to purge 95% of the NaOH is 0.38 h

Explanation:

Given:

vfpure water(i) = 3 m³/h

vNaOH = 4 m³

xNaOH = 0.2

vfpure water(f) = 2 m³/h

pwater = 1000 kg/m³

pNaOH = 1220 kg/m³

The mass flow rate of the water is = 3 * 1000 = 3000 kg/h

The mass of NaOH in the solution is = 0.2 * 4 * 1220 = 976 kg

When the 95% of the NaOH is purged, thus the NaOH in outlet is = 0.95 * 976 = 927.2 kg

The volume of NaOH in outlet after time is = 927.2/1220 = 0.76 m³

The time required to purge the 95% of the NaOH is = 0.76/2 = 0.38 h

4 0
3 years ago
Developed an automated program in any language which take 12 dependent variable and corresponding independent variables and show
otez555 [7]

Answer:

Explanation:

var generator = new Random(1);

// Now the nextGaussian() function returns a normal distribution of random numbers with the following parameters: a mean of zero and a standard deviation of one

var draw = function() {

var num = generator.nextGaussian();

var standardDeviation = 60;

var mean = 2003;

// Multiply by the standard deviation and add the mean.

var x = standardDeviation * num + mean;

noStroke();

fill(214, 159, 214, 10);

ellipse(x, 200, 16, 16); };

Hope this will be helpful

3 0
2 years ago
Three capillary tubes with different radius (r1=1.0mm, r2=0.1mm, r3=0.01mm) are inserted into the same cup of water. The surface
kobusy [5.1K]

Answer:

you fgykyiihohuoououu

Explanation:

jjj

4 0
2 years ago
Why does the auto industry prefer uniform (national) standards for automobile emissions as opposed to regionally varying standar
WINSTONCH [101]

Answer:

Explanation:

For automobile emission, a uniform standard is preferred, because no unnecessary advantage is given by it to any company that is located in particular states where the regional standards are less severe.

Since pollution has its impact across the states and in the whole of the USA, then there should be uniform standards across all the states. It will also invalidate the impact of regional standards as a factor in the selection of plant locations for the automobile company. It means that a state offering less valid emission standards, will attract more companies to herself and it will be against the other states who care more about the natural environment. It can make more states to opt for the permissive emission standards, that will be more harmful to the USA as a country, than the good. So, a uniform standard is preferred to eliminate it as a factor in plant location decisions.

Yes, uniform standards are beneficial to everyone, because it will bring effective control upon the pollution level because there will be no state where the culprit firm can hide. Besides, it is more effective as efforts done towards environment conservation.

3 0
3 years ago
Line.
Veronika [31]

Air supplied to a pneumatic system is supplied through the C. Actuator

Explanation

Pneumatic systems are like hydraulic systems, it is just that these systems uses compressed air rather than hydraulic fluid.  Pneumatic systems are used widely across the industries. these pneumatic systems needs a constant supply of compressed air to operate. This is provided by an air compressor. The compressor sucks in air at a very high rate from the environment and stores it in a pressurized tank. the Air is supplied thereafter with the help of a actuator valve that is a more sophisticated form of a valve.

From the above statement it is clear that Air supplied to a pneumatic system is supplied through the  Actuator

7 0
3 years ago
Other questions:
  • What are the causes of electric shock​
    13·1 answer
  • 5.5 A scraper with a 275 hp diesel engine will be used to excavate and haul earth for a highway project. An evaluation of the jo
    10·1 answer
  • At a festival, spherical balloons with a radius of 140.cm are to be inflated with hot air and released. The air at the festival
    10·1 answer
  • ). A 50 mm diameter cylinder is subjected to an axial compressive load of 80 kN. The cylinder is partially
    8·1 answer
  • Why Your first project as the new web designer at Smart Design is to increase web traffic to help boost web orders. Before you b
    6·1 answer
  • Which type of load generates a magnetic field?
    12·1 answer
  • Although many countries have issues with soil erosion due to deforestation, some of the most serious effects are seen
    8·1 answer
  • State 3 advantages and 3 disadvantages of unit rate contract​
    10·1 answer
  • Hello, so I have a watch and I don't know where the plugin for the charger is, or what brand it is. Please do help and please DO
    11·1 answer
  • The use of seatbelts in a car has significantly reduced the number of crash fatalities. Which statement best explains how societ
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!