Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program to ask the user to enter number less than 5 5 using the below code as a skeloton. If the user enters

Write a program to ask the user to enter number less than 55 using the below code as a skeloton. If the user enters greater than 5,5, the program will loop to ask the user to enter the number less than 55 again until user enter the number less than 5.5. Display the number if the user enter number less than 5.5. The maximum attempts not more than 88 times. If the user did not enter the number less than 55 in 88 attempts, the program will prompt Fail at the screen.
..model small
..stack 100100h
..data
val11 dw ??
msg11 db 'Data to be push : $'" id="MathJax-Element-18-Frame" role="presentation" style="font-size: 121%; position: relative;" tabindex="0">'' ;
msg22 db 'Data from pop : $'" id="MathJax-Element-20-Frame" role="presentation" style="font-size: 121%; position: relative;" tabindex="0">'' ;
..code
mov ax,,@data
mov ds,,ax
lea dx,, msg11
mov ah,09,09h
int 2121h
mov ah,2,2
mov dx,32,32H
int 2121h
mov ax,32,32H
push ax
mov ah,2,2
mov dl,0,0dh
int 2121h
mov dl,0,0ah
int 2121H
lea dx,, msg11
mov ah,09,09h
int 2121h
mov ah,2,2
mov dx,34,34H
int 2121h
mov ax,34,34H
push ax
mov ah,2,2
mov dl,0,0dh
int 2121h
mov dl,0,0ah
int 2121H
pop val11
lea dx,, msg22
mov ah,09,09h
int 2121h
mov ah,2,2 mov dx,, val11
int 2121h
mov ah,2,2
mov dl,0,0dh
int 2121h
mov dl,0,0ah
int 2121H
lea dx,, msg11
mov ah,09,09h
int 2121h
mov ah,2,2
mov dx,36,36H
int 2121h
mov ax,36,36H
push ax
mov ah,2,2
mov dl,0,0dh
int 2121h
mov dl,0,0ah
int 2121H
pop val11
lea dx,, msg22
mov ah,09,09h
int 2121h
mov ah,2,2
mov dx,, val11
int 2121h
mov ah,2,2
mov dl,0,0dh
int 2121h
mov dl,0,0ah
int 2121H
pop val11
lea dx,, msg22
mov ah,09,09h
int 2121h
mov ah,2,2
mov dx,, val11
int 2121h
mov ah,4,4ch
int 2121h
end

Step by Step Solution

3.39 Rating (140 Votes )

There are 3 Steps involved in it

Step: 1

Heres the code implementing the required functionality model small stack 100h data prompt db Enter a number less than 55 failMsg db Fail num dw To store the users input maxAttempts db 8 Maximum allowe... 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

Income Tax Fundamentals 2013

Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill

31st Edition

1111972516, 978-1285586618, 1285586611, 978-1285613109, 978-1111972516

More Books

Students also viewed these Programming questions

Question

Write a paper about medication error system 2016.

Answered: 1 week ago