0% found this document useful (0 votes)
17 views

HW5

This document contains macros and code for a grade evaluation program in assembly language. The program prompts the user to enter a grade, then compares the input to value ranges to display the corresponding evaluation.

Uploaded by

GökmenFiliz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

HW5

This document contains macros and code for a grade evaluation program in assembly language. The program prompts the user to enter a grade, then compares the input to value ranges to display the corresponding evaluation.

Uploaded by

GökmenFiliz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

;

----------------------------------------------------------------------------------
CLEAR MACRO
MOV AX,0600H
MOV BH,07
MOV CX,0000
MOV DX,184FH
INT 10H
ENDM
;
----------------------------------------------------------------------------------
CURSOR MACRO Col, Row
MOV AH,02
MOV BH,00
MOV DL,Col
MOV DH,Row
INT 10H
ENDM
;
----------------------------------------------------------------------------------
DISP MACRO MES
MOV AH,09
MOV DX,OFFSET MES
INT 21H
ENDM
;
----------------------------------------------------------------------------------

.MODEL SMALL
.STACK 64H
.DATA
MES1 DB ' Please enter the grade','$'
MES2 DB ' Fail','$'
MES3 DB ' Satisfactory','$'
MES4 DB ' Good','$'
MES5 DB ' Very Good','$'
MES6 DB ' Excellent','$'
.CODE
MAIN: MOV AX,@DATA
MOV DS, AX
CLEAR
CURSOR 05,08
DISP MES1
MOV AH, 07
INT 21H
CMP AL,'50'
JB Next1
CMP AL,'59'
JEB Next2
CMP AL,'69'
JEB Next3
CMP AL,'79'
JEB Next4
CMP AL,'99'
JEB Next5
CURSOR 05,09
DISP MES7
JMP EXIT
NEXT1: CURSOR 05,09
DISP MES2
NEXT2: CURSOR 05,09
DISP MES3
NEXT3: CURSOR 05,09
DISP MES4
NEXT4: CURSOR 05,09
DISP MES5
NEXT5: CURSOR 05,09
DISP MES6
EXIT: MOV AH, 4CH
INT 21H
END MAIN

You might also like