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 18:40
Mariah was working on a multimedia presentation that included both video and audio files. the file was huge, and she wanted to send it to her coworker in another office. she needed to reduce the size of the file so that it could be transmitted faster. the utility she used to do this was
Answers: 2
question
Computers and Technology, 24.06.2019 08:30
Formatting rows and columns is similar to cell formatting. in an openoffice calc spreadsheet, you can format data entered into rows and columns with the of the rows and columns options. you can insert rows and columns into, or delete rows and columns from, a spreadsheet. use the insert or delete rows and columns option on the insert tab. alternatively, select the row or column where you want new rows or columns to appear, right-click, and select insert only row or only column options. you can hide or show rows and columns in a spreadsheet. use the hide or show option on the format tab. for example, to hide a row, first select the row, then choose the insert tab, then select the row option, and then select hide. alternatively, you can select the row or columns, right-click, and select the hide or show option. you can adjust the height of rows and width of columns. select row and then select the height option on the format tab. similarly, select column, then select the width option on the format tab. alternatively, you can hold the mouse on the row and column divider, and drag the double arrow to the position. you can also use the autofit option on the table tab to resize rows and columns.
Answers: 1
question
Computers and Technology, 24.06.2019 12:50
What percentage of teens plays video games? a.97% b.100% c.74% d.50%
Answers: 1
question
Computers and Technology, 24.06.2019 19:30
Which phrase is the best definition of a pivottable a a table containing data that is organized horizontally b a table used to calculate financial pivot values c a tool used to summarize data d a table containing specific formatting
Answers: 1
You know the right answer?
Sum = 0;

for X = 1 to 10 do

Sum = Sum + X;

The following code...
Questions
question
Mathematics, 22.06.2019 05:00
question
Mathematics, 22.06.2019 05:00
question
Mathematics, 22.06.2019 05:00
question
Mathematics, 22.06.2019 05:00
question
Mathematics, 22.06.2019 05:00
question
Mathematics, 22.06.2019 05:00
question
History, 22.06.2019 05:00
question
Mathematics, 22.06.2019 05:00
Questions on the website: 13722361