Question: Using the instruction set in Figure 6 . 5 , translate the following algorithmic operations into assembly code. Show all necessary . DATA pseudo -

Using the instruction set in Figure 6.5, translate the following algorithmic operations into assembly code. Show all necessary .DATA pseudo-ops.
a. Add 1 to the value of x
b. Add 50 to the value of x
c. Set x to the value y+z-2
d. If x>50 then output the value of x, otherwise input a new value of x
e.??=0
I=0
While I50 do
sum = sum +I;
I=I+1;
End of the loop
2. Using the instruction set in Figure 6.5, write a complete assembly language program (including all necessary pseudo-ops) that reads in numbers and counts how many nonnegative inputs it reads in until it encounters the first negative value. It then outputs that count and stops. For example, if the input data is 42,108,99,60,1,42,3,-27, then your program outputs the value 7 because there are seven nonnegative values before the appearance of the negative value -27.
3. Now modify your program from Practice Problem 2 so that if you have not encountered a negative value after 100 inputs, your program stops and outputs the value 100.
 Using the instruction set in Figure 6.5, translate the following algorithmic

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!