26. Write an assembly language program that corresponds to the following C program: const int amount =
Question:
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.
Fantastic news! We've Found the answer you've been seeking!
Step by Step Answer:
Related Book For
Question Posted: