Question: 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!