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 flow rate sensing device used on a liquid transport pipeline functions as follows. The device provides a 5-bit output where al
marysya [2.9K]

Answer:

Explanation:

The step by step analysis is as shown in the attached files.

8 0
3 years ago
Out
olchik [2.2K]

ave you ever seen a Rube Goldberg machine in action? You probably have, even if you didn’t know what it was. A Rube Goldberg machine is a contraption that uses a chain reaction to carry out a simple task. It performs a very basic job in a complicated way.

7 0
3 years ago
¿Qué aditivo se debe incorporar a la masa de hormigón para aumentar su resistencia frente a los ciclos alternados de hielo-deshi
tamaranim1 [39]

Answer:

Los aditivos que deben incorporarse a la masa de concreto para aumentar su resistencia a los ciclos alternos de congelación y descongelación son;

1. Agentes de arrastre de aire (AEA) o

2. Materiales poliméricos súper absorbentes

Explanation:

La resistencia alterna de los ciclos de congelación y descongelación en el concreto puede aumentarse mediante la adición de agentes de arrastre de aire.(AEA) que es un surfactante, crea burbujas de aire muy pequeñas en el concreto resultante para mejorar la durabilidad y resistencia del cemento al ciclo repetido de congelación y descongelación o materiales poliméricos súper absorbentes

Ejemplos de agentes de arrastre de aire son;

Sulfonatos alcalinos

Acidos de resinas sulfonadas

Sales de ácidos grasos

Ejemplos de materiales poliméricos superabsorbentes son;

SAP0.26CT

SAP0.39PT.

6 0
4 years ago
Do NOT mix ____________________ with used oil. A) Transmission oilB) AntifreezeC) Hydraulic fluidsD) Synthetic oil
Scorpion4ik [409]
Do not mix Antifreeze with used oil
6 0
3 years ago
We have a parallel-plate capacitor, with each plate having a width W and a length L. The plates are separated by air with a dist
Vesnalui [34]

Answer:

k

Explanation:

8 0
3 years ago
Other questions:
  • The atmosphere within a room is at 70 °F dry-bulb temperature, 50 percent degree of saturation, and 14.696 psia pressure. The in
    14·1 answer
  • An Ideal gas is being heated in a circular duct as while flowing over an electric heater of 130 kW. The diameter of duct is 500
    9·1 answer
  • Two balanced Y-connected loads in parallel, one drawing 15kW at 0.6 power factor lagging and the other drawing 10kVA at 0.8 powe
    13·1 answer
  • Tanya Pierce, President and owner of Florida Now Real Estate is seeking your assistance in designing a database for her business
    9·1 answer
  • Which factors influence changes in consumer demands? check all that apply
    8·2 answers
  • What happens to battery when it produces current to the system
    10·1 answer
  • A smoking lounge is to accommodate 19 heavy smokers. The minimum fresh air requirement for smoking lounges is specified to be 30
    11·1 answer
  • When removing a diesel engine from a truck, Technician A says it is OK to disconnect an air con­ditioning hose, but the refriger
    8·1 answer
  • E) What are the major jobs of a nurse?<br><br>​
    14·1 answer
  • What is the purpose of placing a large electrolytic capacitor in the output side of a power supply
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!