Question: Problem 6 6a (4 points) Write an assembly language program that corresponds to the C++ program: Comment each line except STOP and .END. Add something

Problem 6

  • 6a (4 points) Write an assembly language program that corresponds to the C++ program:
    • Comment each line except STOP and .END.
    • Add something to the output that makes this program uniquely yours.
    • Cut and paste Source Code into your document.
  • 6b (4 points) Run it twice once with values that yield an output that is within the range of the Pep8 and once with values that yield an output that is outside the range of the Pep8. Explain the limits. Paste screen shots of the Output area of the Pep8 for both runs
  • 6c (2 points) Explain the status bits NZVC at the point that STOP is loaded for the invalid run.

/******************

HW3P6

******************/

#include

using namespace std;

int a;

int b;

int c;

int d;

int sum;

int ave;

int main(){

cin>>a>>b>>c>>d;

sum = a+b+c+d;

ave = sum/2/2;

cout<<"input a = "<

cout<<"input b = "<

cout<<"input c = "<

cout<<"input d = "<

cout<

cout<<"sum = "<

cout<<"average = "<

return 0;

}

Next Page

6a Source Code

6b Output for both runs

6c Explain the status bits NZVC for the invalid runs

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!