Question: Write a program in Assembly that will use a loop to print all of the numbers between a user input integer x and 0
Write a program in Assembly that will use a loop to print all of the numbers between a user input integer x and 0 inclusive. If the integer being printed is even, print the actual number. If the integer is odd, print a hashtag (#) instead. Separate each integer (or #) with an underscore ) but do not display an underscore before the first output nor after the final 0. If the user input integer x is a negative number, the program should halt immediately with no output. Ensure the code is commented thoroughly. Some sample runs are shown below. Other input values would produce different results. Enter an integer: 8 Enter an integer: 7 8__6__4__2_+_0 +_6_4_4__2__0 Enter an integer: -5 Enter an integer: 0 program is finished running a) Write a program to solve the problem as indicated. Include an ID box and purpose. b) Save this program as "L11Q2initials.asm" replacing initials with your actual initials. c) Submit your file electronically for marking (unless otherwise instructed).
Step by Step Solution
There are 3 Steps involved in it
To solve this problem youll need to write an Assembly program that takes a user input integer x and displays numbers from x to 0 printing even numbers ... View full answer
Get step-by-step solutions from verified subject matter experts
