Question: Write a Pep / 9 assembly language program that reads two integer values from the keyboard and prints the difference of the original input values,
Write a Pep assembly language program that reads two integer values from the keyboard and prints the difference of the original input values, the difference doubled, the difference tripled, and the difference quadupled on separate lines. In other words, your program should produce exactly the same output as the following C program:
#include int num; int num; int diff; int calcVal; int main printf ; scanfd # printf ; scanfd # diff num num; calcVal diff diff; printfdifference of inputs d
diff; printfd
calcVal; calcVal diff; printfd
calcVal; calcVal diff; printfd
calcVal; return ; end of main
Notes:
BE SURE TO RUN THE PROGRAM IN "Terminal" MODE IN Pep AND NOT "Batch" MODE SO THAT IT WORKS AS AN INTERACTIVE PROGRAM.
The input prompt symbols and the output labels for each of the lines must be printed on the output, as well as the answers.
Adding a number to itself is the same as doubling the number; adding it again is the same as tripling the original number, etc.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
