subject

Sum = 0;

for X = 1 to 10 do

Sum = Sum + X;

The following code is meant to perform the above function in assembly. Please fix so that it it executable.

ORG 100

Load One /Load constant

Store X /Initialize loop control variable X

Loop, Load X /Load X

Subt Ten /Compare X to 10

SkipCond 000 /If AC<0 (X is less than 10), continue loop

Jump Endloop /If X is not less than 10, terminate loop

Load Sum

Add X /Add X to Sum

Store Sum /Store result in Sum

Load X

Add One /Increment X

Store X

Jump Loop

Endloop, Load Sum

Output /Print Sum

Halt /terminate program

Sum, Dec 0

X, Dec 0 /Storage for X

One, Dec 1 /The constant value 1

Ten, Dec 10 /The loop constant

END

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 04:00
Acetylene is a gas which burns rapidly on its own, and is considered highly explosive. a) true b) false
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
You are new to microsoft certification and want to start out by getting a certification geared around windows 8. what microsoft certification should you pursue?
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
Hey i just logged on and one of the moderators deleted a bunch of my answers to questions, even though the answers were right and the people it doesn't make sense but if anyone wants to talk about anything just message me lol (this is super random lol)
Answers: 1
question
Computers and Technology, 23.06.2019 17:00
In which of the following ways can using test-taking tips you? a. you can focus on the information that you need to study. b. you will see the answers to the test. c. you will study more. d. you will be less organized.
Answers: 1
You know the right answer?
Sum = 0;

for X = 1 to 10 do

Sum = Sum + X;

The following code...
Questions
question
Mathematics, 12.09.2021 04:20
question
Social Studies, 12.09.2021 04:20
question
Social Studies, 12.09.2021 04:20
question
English, 12.09.2021 04:20
Questions on the website: 13722359