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
Step: 1
C program for printing all numbers Divid...See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started