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
What is the shape of the output signal on a rigexpert analyzer?
Gekata [30.6K]

Answer:

Output signal shape: square, from 0.1 to 230 MHz. Output power: -10 dBm (at a load of 50 Ohms).

Explanation:

8 0
3 years ago
Read 2 more answers
This is a classification of back pain based on duration. A) AcuteB) RecurrentC) ChronicD) All of the above
butalik [34]

Answer:

D) All of the above.

4 0
3 years ago
Dampers dampers springs are used inside some valve spring to
harkovskaia [24]
The correct answer is A. Retain. Valve Stem seals
3 0
3 years ago
1 gallon of benzene having a density of 0.88 g/mL is spilled in 200 feet by 150 foot lake having an average depth of 6 feet. Wha
Irina18 [472]

Answer:

The concentration of benzene in this contaminated lake would be 653549ng/L.

Explanation:

The concentration C of a contaminant over a body of water of volume V can be obtained as:

C=Mass contaminant / V

In this case, the volume of the body of water:

V=200ft\cdot150ft\cdot6ft=5097.033m^3

The mass of the contaminant (Benzene):

m=\delta V_{ben}=0.88\frac{g}{ml} 1gal(us)=3.3311kg

Therefore:

C=\frac{m_{ben}}{V_{lake}}=6.53549\cdot10^{-4}kg/m^3=653549ng/l

4 0
4 years ago
an electric circuit includes a voltage source and two resistances (50 and 75) in parallel. determine the voltage source required
ASHA 777 [7]

Answer:

The voltage source required to provide 1.6 A of current through the 75 ohm resistance is 120 V.

Explanation:

Given;

Resistance, R₁ = 50Ω

Resistance, R₂ = 75Ω

Total resistance, R = (R₁R₂)/(R₁ + R₂)

Total resistance, R = (50 x 75)/(125)

Total resistance, R = 30 Ω

According to ohms law, sum of current in a parallel circuit is given as

I = I₁ + I₂

I = \frac{V}{R_1} + \frac{V}{R_2}

Voltage across each resistor is the same

1.6 = \frac{V}{R_2}  

V = 1.6 x R₂

V = 1.6 x 75

V = 120 V

Therefore, the voltage source required to provide 1.6 A of current through the 75 ohm resistance is 120 V.

This voltage is also the same for 50 ohms resistance but the current will be 2.4 A.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Consider a Mach 4.5 airflow at a pressure of 1.25 atm. We want to slow this flow to a subsonic speed through a system of shock w
    15·1 answer
  • An industrial system is rated at 600 v the system includes a partially exposed terminal block thats mounted on a bulkhead a new
    5·1 answer
  • Elastic recovery: a. Is the strain that remains in a material when it is deformed plastically, then unloaded. b. Is the strain t
    14·1 answer
  • . A 10W light bulb connected to a series of batteries may produce a brighter lightthan a 250W light bulb connected to the same b
    8·2 answers
  • How many answer do you need to have a conversation ?
    7·1 answer
  • Locução adjetiva e de portuges ou istoria
    8·1 answer
  • 8. What is the purpose of the 300 Log?
    12·1 answer
  • Select three types of variables scientists use in experiments.
    6·2 answers
  • How many times greater is the value of the 2 of the 270413 than the valuce of the 2 in 419427?
    8·1 answer
  • During delivery of a 2023 ariya equipped with propilot assist 2. 0, what should you point out to your customers about the turn s
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!