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
Which of the following is used as part of a four-wheel drive system? A. Front drive axles B. Transfer Case C. Front Drive Shaft
xxMikexx [17]

Answer:

D: All of the above.

Have a good day!

4 0
4 years ago
Students are expected to respond to one of the two questions described below. Students should provide examples to clarify their
Flura [38]

Answer:

can u explain what we are answering?

Explanation:

7 0
4 years ago
What is the tool used to take off a wheel nut
pishuonlain [190]

Answer:

A socket wrench

Explanation:

My dad is a mechanic

8 0
4 years ago
Read 2 more answers
Speed limit signs are classified as
luda_lava [24]

Answer:

B. Regulatory signs

Explanation:

traffic rules

5 0
3 years ago
Read 2 more answers
Esma and hasan are putting the finishing touches on their model for a tiny chip-based energy source to power their lighting syst
Bas_tet [7]

The phase of the engineering design process which should be completed next is to test their work and is denoted as option C.

<h3>What is Engineering design?</h3>

These are the series of steps and techniques which are done by individuals in the making of functional product and services.This employs the use of scientific methods and also ensures an easier living for different individuals.

The first stage involves identifying the problem and then building a prototype through the use of different materials. This is then tested before the final finishing work is done to ensure the parts are properly placed before they are moved for evaluation by other people.

Read more about Engineering design here brainly.com/question/411733

#SPJ1

7 0
2 years ago
Other questions:
  • An alloy in the A-B system is 40% B and is within the α + β two phase field, where the a phase contains 5% B and the β phase con
    11·1 answer
  • Which of the following sentences correctly uses commas after prepositional phrases
    14·1 answer
  • The Canadair CL-215T amphibious aircraft is specially designed to fight fires. It is the only production aircraft that can scoop
    7·1 answer
  • A 2-mm-diameter electrical wire is insulated by a 2-mm-thick rubberized sheath (k = 0.13 W/m K), and the wire/sheath interface i
    11·1 answer
  • What are the basic parts of a radio system
    15·1 answer
  • A water jet pump involves a jet cross-sectional area of 0.01 m^2, and a jet velocity of 30 m/s. The jet is surrounded by entrain
    10·1 answer
  • Which option distinguishes the step in the requirements engineering process described in the following scenario?
    9·2 answers
  • The engineer must place a catch basin at the north west corner of the yard of a subdivision lot. The catchment area will be calc
    5·1 answer
  • Who is responsible for shielding a welding arc to protect
    11·1 answer
  • Hwan also wants to determine the depreciation balance for the first year and the last year of the useful life of the product har
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!