Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use below code as reference / skeleton . Try not to deviate from the windows x 8 6 paradigms. Write a program to ask the

Use below code as reference/skeleton. Try not to deviate from the windows x86 paradigms.
Write a program to ask the user to enter number less than 5. If the user enters greater than 5, the program will loop to ask the user to enter the number less than 5 again until user enter the number less than 5. Display the number if the user enter number less than 5. The maximum attempts not more than 8 times. If the user did not enter the number less than 5 in 8 attempts, the program will prompt Fail at the screen.
.model small
.stack 100h
.data
msg1 db 'Before NOT : $'
msg2 db 'After NOT : $'
num1 db 063h ; 63 in hexadecimal is equal to c in ASCII
num2 db ? ;to store the value after NOT operation
; 6=01103=0011 value in binary
; 10011100 not the value(1 become 0 and 0 become 1)
; 9 C value in hexa after not
.code
mov ax,@data
mov ds,ax
lea dx, msg1
mov ah,09h
int 21h ; display the msg1 string
mov ah,2
mov dl, num1
int 21h ;display the value in num1
mov al, num1
not al ; not the value in num1
mov num2, al ; move the value after NOT to num2
lea dx, msg2
mov ah,09h
int 21h ; display the msg1 string
mov ah,2
mov dl, num2
int 21h ;display the value in num2
mov ah,4ch
int 21h
end

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

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

Derive (4.29) for E of a classical oscillator.

Answered: 1 week ago