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
Does anyone know how to fix this? It's a chromebook and project where I have to try to fix it​
Zielflug [23.3K]

Answer:

Hey I found this on You Tube it may help u a lot

Explanation:

https://youtu.be/ab9BdT6fYJ8

4 0
2 years ago
In , the industries with the most complaints to the Better Business Bureau were banks, cable and satellite television companies,
navik [9.2K]

Answer:

Answer for the question:

In , the industries with the most complaints to the Better Business Bureau were banks, cable and satellite television companies, collection agencies, cellular phone providers, and new car dealerships (USA Today, April 16, 2012). The results for a sample of complaints are contained in the DATAfile named BBB. Click on the datafile logo to reference the data."

is explained in the attachment.

Explanation:

Download pdf
6 0
3 years ago
What is a smooth flow of air over a surface is called?
pochemuha

Answer:

laminar flow

Explanation:

In fluid dynamics, laminar flow is characterized by fluid particles following smooth paths in layers, with each layer moving smoothly past the adjacent layers with little or no mixing.

4 0
3 years ago
what i the maximum flow rate of glycerine at 20C in a 10cm diameter pipe that can be assumed to remain laminar
ELEN [110]

Answer: tube flow

Explanation:

7 0
3 years ago
The temperature of a system rises by 10 °C during a heating process. Express the rise in temperature of K, R, and °F.
Lorico [155]

Explanation:

Given T = 10 °C

The conversion of T( °C) to T(K) is shown below:

T(K) = T( °C) + 273.15  

So,  

T = (10 + 273.15) K = 283.15 K

<u>T = 283.15 K </u>

The conversion of T( °C) to T(F) is shown below:

T (°F) = (T (°C) × 9/5) + 32  

So,

T (°F) = (10 × 9/5) + 32 = 50 °F

<u>T = 50 °F</u>

The conversion of T( °C) to T(R) is shown below:

T (R) = (T (°C) × 9/5) + 491.67

So,

T (R) = (10 × 9/5) + 491.67 = 509.67 R

<u>T = 509.67 R</u>

6 0
4 years ago
Other questions:
  • 8. In a closed hydraulic brake system, the hydraulic pressure:
    8·2 answers
  • The outer surface temperature of a glass filled with iced water may drop below the dew-point temperature of the surrounding air,
    5·1 answer
  • What is the temperature dependency of the electrical conductivity for metals and semiconductors??
    6·1 answer
  • The densities of several materials are given in SI units. Convert these to densities in U.S. customary units (slug/ft3), and als
    12·1 answer
  • When diagnosing engine noise, Technician A says a mechanical stethoscope may not be appropriate in pinpointing a squeaking drive
    14·1 answer
  • WHAT IS THE MOST POWERFUL PART IN A CAR
    13·2 answers
  • A cylinder fitted with a movable piston contains water at 3 MPa with 50% quality, at which point the volume is 20 L. The water n
    8·2 answers
  • 1. Differentiate between speed and velocity.<br>​
    9·2 answers
  • What is the placement of a lock out device on an energy isolating device?.
    12·1 answer
  • the left rear brake drum is scored, but the right rear drum looks as good as new. technician a says the left-side drum should be
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!