Question: 26. Write an assembly language program that corresponds to the following C program: const int amount = 20000; int num; int sum; int main ()
26. Write an assembly language program that corresponds to the following C program:
const int amount = 20000;
int num;
int sum;
int main () {
scanf("%d", &num);
sum = num + amount;
printf("sum = %d", sum);
return 0;
}
Test your program twice. The first time, enter a value for num to make the sum within the allowed range for the Pep/9 computer. The second time, enter a value that is in range but that makes sum outside the range. Note that the out-of-range condition does not cause an error message but just gives an incorrect value. Explain the value.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
