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
Why is concrete on its own not a good material to use
Inga [223]

Answer:

It has poor tensile strength despite having high compressive strength

Explanation:

Concrete exhibits high compressive strength when used. However, it has very low compressive strength. This is the reason why concrete is normally combined with steel to make a composite building material called reinforced concrete. The steel reinforces concrete hence increasing the tensile strength in RC buildings. The end composite is durable and fireproof. Generally, the main reason why concrete is not use on its own is due to its poor tensile strength.

7 0
3 years ago
A 75- kw, 3-, Y- connected, 50-Hz 440- V cylindrical synchronous motor operates at rated condition with 0.8 p.f leading. the mot
Thepotemich [5.8K]

78950W the answer

Explanation:

A 75- kw, 3-, Y- connected, 50-Hz 440- V cylindrical synchronous motor operates at rated condition with 0.8 p.f leading. the motor efficiency excluding field and stator losses, is 95%and X=2.5ohms. calculate the mechanical power developed, the Armature current, back e.m.f, power angle and maximum or pull out torque of the motor

A 75- kw, 3-, Y- connected, 50-Hz 440- V cylindrical synchronous motor operates at rated condition with 0.8 p.f leading. the motor efficiency excluding field and stator losses, is 95%and X=2.5ohms. calculate the mechanical power developed, the Armature current, back e.m.f, power angle and maximum or pull out torque of the motor

5 0
3 years ago
What is the velocity of flow in an asphalt channel that has a hydraulic radius of 3.404 m, length of 200 m and bed slope of 0.00
yKpoI14uk [10]

Answer:

The velocity of flow is 10.0 m/s.

Explanation:

We shall use Manning's equation to calculate the velocity of flow

Velocity of flow by manning's equation is given by

V=\frac{1}{n}R^{2/3}S^{1/2}

where

n = manning's roughness coefficient

R = hydraulic radius

S = bed slope of the channel

We know that for an asphalt channel value of manning's roughness coefficient = 0.016

Applying values in the above equation we obtain velocity of flow as

V=\frac{1}{0.016}\times 3.404^{2/3}\times 0.005^{1/2}\\\\\therefore V=10.000m/s

7 0
3 years ago
Sinks must be used for the correct intended purpose to prevent
irakobra [83]

Answer:

... spilling water or getting anything cascading onto the floor

8 0
3 years ago
True or false. Part of the mission of the NTSB is to determine the probable cause of an accident
eimsori [14]

uniform

welcome 2 Ghana African state western region

6 0
3 years ago
Other questions:
  • Which of the following does NOT describe product design.
    11·1 answer
  • Select the correct answer.
    12·2 answers
  • Water circulates throughout a house in a hot water heating system. If the water is pumped at a speed of 0.50m/s through a 4.0-cm
    5·1 answer
  • Design a PLC ladder logic program to control the operation of a conveyor-storage system using the following sequence: - 1. Progr
    5·1 answer
  • em 4:A water jet strikes normal to a xedplate. If diameter of the outlet of the nozzle is 8 cm,and velocity of water at the outl
    9·1 answer
  • A belt drive was designed to transmit the power of P=7.5 kW with the velocity v=10m/s. The tensile load of the tight side is twi
    14·1 answer
  • PLEASE ANSWER SOON
    7·1 answer
  • Is the MI-24 Hind the most widely exported combat helicopter in the world?
    14·1 answer
  • HELP PLEASE!!!!
    12·1 answer
  • The _____ plane is the plane in which the side of an object appears in
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!