Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi , please assist with the question below, there are answers for this question on chegg. however I keep getting a invalid combination of opcode

Hi
,
please assist with the question below, there are answers for this question on chegg. however I keep getting a "invalid combination of opcode and operands" error for the line that contains "div
3
"
or even "div byte
3
"
.
please make sure that this error is not present in the code you provide me with or advise how I can work around this error. Thank you!. PS: this question was just answered by someone, however the code would not run. The ms-dos application file would be created, but just would not open/run
Question
4
[
5
0
]
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
3
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
1
0
,
column
0
.
Prompt the user to key in the number
(
1
-
9
)
.
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
0
9
.
Display
*
*
next to the number if the number is out of range and read again.
Divide the number by
3
.
If the remainder is equal to zero, we know that the number is divisible by
3
,
otherwise it is not.
If the number is divisible by
3
,
display the following message:
Number is a multiple of
3
otherwise display the message
Number is not a multiple of
3
.
Terminate the program.
The following is an example of what the program should do
.
The user input is displayed in italics, i
.
e
.
9
below.
Please enter the number you select:
8
The number is not a multiple of
3
NB: Submit three screen shots of different test runs performed.
Marks will be allocated as follows:
Clearing the screen and changing the screen colour
(
3
)
Changing the cursor position
(
2
)
Displaying the user prompt
(
2
)
Reading the number
(
ASCII character
)
(
2
)
Converting the number to a numeric value
(
2
)
Testing the range and displaying an error message if the number is invalid
(
4
)
Calculation
(
4
)
A program listing submitted
(
6
)
Three screen shots of test cases submitted
(
3
\
times
5
)
(
1
5
)
The program structure
(
5
)
The program documentation
(
comments
)
5
)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach To Design Implementation And Management

Authors: THOMAS CONNOLLY

6th Edition

9353438918, 978-9353438913

More Books

Students also viewed these Databases questions

Question

Who will implement and maintain the project after launch?

Answered: 1 week ago

Question

analyze aesthetic enhancing design rules.

Answered: 1 week ago

Question

apply communication design concepts into creative projects.

Answered: 1 week ago