Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem # 1 : Write an 8 0 8 6 assembly code for the following: A ) Print out on the console screen main _

Problem # 1: Write an 8086 assembly code for the following:
A) Print out on the console screen main_menu. [2 PTS]
B) Print out on the console screen MSG1, allow the input of a character
(A, S, C, or D), and then store it in choice. [4 PTS]
C) Print out on the console screen MSG2, allow the input of first number
between 0 and 9, and then store it in number1.[4 PTS]
D) Print out on the console screen MSG3, allow the input of the second number
between 0 and 9, and then store it in number2.[4 PTS]
E) Perform the arithmetic operation on the two numbers stored on number1 and
number2 and then store the result on result. [4 PTS]
ORG 100h
HLT
main_menu db "*****************************",0dh,0ah
db "* Enter A for Addition ",0dh,0ah
db "* Enter S for Subtraction ",0dh,0ah
db "* Enter D for Division ",0dh,0ah
db "* Enter M for Multiplication ",0dh,0ah,
db "* Enter B for setting background and foreground colors to cyan and light
red respectively ",0dh,0ah,
db "* Enter D to Clear screen and then display a pattern in screen
middle",0dh,0ah,
db "*****************************",0dh,0ah,,0dh,0ah,'$'
MSG1 db 0dh,0ah,"Enter your Choice:",0dh,0ah,'$'
MSG2 db 0dh,0ah,"Enter First number:",0dh,0ah,'$'
MSG3 db 0dh,0ah,"Enter Second number:",0dh,0ah,0dh,0ah,'$'
choice db ?
number1 db ?
number2 db ?
result db ?

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_2

Step: 3

blur-text-image_3

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

More Books

Students also viewed these Databases questions