include irvine32.inc
.386
.stack 4096
Exitprocess proto,dwExitcode:dword
.data
str1 byte "Enter the value of x:",0
str2 byte "Enter the value of y:",0
str3 byte "Enter the value of a:",0
str4 byte "Enter the value of b:",0
str5 byte "Quiz 2:",0
a dword ?
b dword ?
x dword ?
y dword ?
.code
main proc
mov edx,offset str1
call WriteString
call ReadInt
mov edx,offset str2
call WriteString
call ReadInt
mov edx,offset str3
call WriteString
call ReadInt
mov edx,offset str4
call WriteString
call ReadInt
mov eax,a
mov ebx,b
mov ecx,x
mov edx,y
cmp eax,ecx
jb new
jmp next
new:
cmp edx,ebx
jbe print
jmp next
print:
mov edx,offset str5
call WriteString
next:
invoke Exitprocess,0
main endp
end main
No comments:
Post a Comment