; ; The code will prompt to input your gpa ; if 5, then output "Excellent"; else, ; output "Study" ; TITLE CMP1.asm ; 32-bit ; INCLUDE Irvine32.inc .data msg byte "Your GPA? ", 10, 13, 0 ex byte "Excellent.", 10, 13, 0 ; 5 stu byte "Study.", 10, 13, 0 goo byte "Good.", 10, 13, 0 ; 4 ave byte "Average.", 10, 13, 0 ; 3 msg1 byte "Input # of newlines: ", 0 .code main PROC mov EDX, offset msg ; primpt a message call WriteString call ReadInt ; p.121 cmp eax, 5 JE LOE ; "study" or "Good" or "Average" cmp eax, 4 je LE4 ; "Good" or "Average" cmp eax, 3 je LE3 mov EDX, offset stu call WriteString JMP LQ LE3: mov EDX, offset ave call writestring jmp LQ LE4: mov EDX, offset goo call writestring jmp LQ LOE: mov EDX, offset ex call WriteString LQ: ;call dumpregs ;call WriteInt ; p.114, 124 call crlf call newlines exit main ENDP newlines PROC mov edx, offset msg1 call writestring call readint mov ecx, eax LL: call crlf LOOP LL RET newlines ENDP END main