Sunday, January 16, 2022

Write a program that ask to user to enter marks of DLD course and check that either student obtain ‘A’ grade or less than ‘A’ grade.

include irvine32.inc

.386

.stack 4096

Exitprocess proto,dwExitcode:dword

.data

str1 byte "please enter your marks in DLD:",0

str2 byte "congratulation!you get A grade in DLD",0

str3 byte "sorry!you cannot get A grade in DLD",0

number dword ?

.code

main proc

mov edx,offset str1

call WriteString

call ReadInt

mov number,eax

cmp eax,84

jae pass

jb second

jmp next

pass:

mov edx,offset str2

call WriteString

jmp next

second:

mov edx,offset str3

call WriteString

next:

invoke Exitprocess,0

main endp

end main 

No comments:

Post a Comment