Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 4 [ 5 0 ] Design a program in assembly language to read a number entered by the user. The program should determine whether
Question
Design a program in assembly language to read a number entered by the user. The program should determine whether or not the number is divisible by and display an appropriate message based on the results on the screen. The program should do the following:
Clear the screen and change the screen colour to white on blue.
Change the cursor position to row column Prompt the user to key in the number Read the number from the keyboard.
Convert the number to a numeric value and store in memory. Test whether the number is in the range Display next to the number if the number is out of range and read again.
Divide the number by If the remainder is equal to zero, we know that the number is divisible by otherwise it is not.
If the number is divisible by display the following message: Number is a multiple of otherwise display the message Number is not a multiple of
Terminate the program.
The following is an example of what the program should do The user input is displayed in italics, ie below.
Please enter the number you select:
The number is not a multiple of
NB: Submit three screen shots of different test runs performed.
Marks will be allocated as follows:
Clearing the screen and changing the screen colour
Changing the cursor position
Displaying the user prompt
Reading the number ASCII character
Converting the number to a numeric value
Testing the range and displaying an error message if the number is invalid
Calculation
A program listing submitted
Three screen shots of test cases submitted times
The program structure
The program documentation comments
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
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