Write a Pep/9 assembly language program which within main() inputs two decimal integers b and e and saves them as two local variables.The integer b is then tested: If b equals 3 the nonvoid function int EXCESS3(int x) is called with e as its actual parameter. The function returns the value of e after adding 3 to it. main() will then output the result and the program will end. If b equals 8 the nonvoid function intEXCESS127(int y) is called with e as its actual parameter. The function returns the value of e after adding 127 to it. main() will then output the result and the program will end. Any other value of b will output “Invalid number of bits” and the program will end. Add tracing tags to the program to enable single stepping
Write a Pep/9 assembly language
If b equals 3 the nonvoid function int EXCESS3(int x) is called with e as its actual parameter. The function returns the value of e after adding 3 to it. main() will then output the result and the program will end.
If b equals 8 the nonvoid function intEXCESS127(int y) is called with e as its actual parameter. The function returns the value of e after adding 127 to it. main() will then output the result and the program will end.
Any other value of b will output “Invalid number of bits” and the program will end.
Add tracing tags to the program to enable single stepping
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 3 images