Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

. model small . 3 8 6 . stack 1 0 0 h . data no db 0 c db 1 t db 0 x

.model small
.386
.stack 100h
.data
no db 0
c db 1
t db 0
x db "Enter password ",13,10,"$"
L db " Your password is incorrect! ",13,10,"$"
tt db " Correct. You made it!",13,10,"$"
.code
main proc
mov AX,@data
mov ds, ax
mov dx,offset x
call mssg
hh:
mov al,0
add al, no
add al, c
mov t, al
call dsp
call y
mov bl, c
mov no, bl
mov al, t
mov c, al
cmp t,31h
js hh
mov dx,offset tt
call mssg
mov ax,4c00h
int 21h
y proc
mov ah,1
int 21h
sub al,30h
cmp al, t
jnz short f
ret
f:
mov dx,offset L
call mssg
mov ax,4c00h
int 21h
y endp
mssg proc
mov ah,9
int 21h
ret
mssg endp
dsp proc
mov ah,6
mov dl, t
add dl,30h
int 21h
inc t
ret
dsp endp
main endp
end main
1-Copy and paste the program into MS word and explain
each line of code.
2-Explain in details the logic of the program?
3-What is the password?
4-What will be the complete display on the screen?

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

Students also viewed these Databases questions