题目:百分制转五级制
程序:
data segment
RES db 86
GRADE db 0
data ends
code segment
assume cs:code,ds:data
main:
mov ax,data
mov ds,ax
mov ax,0
mov al,RES
cmp al,90
JGE A
cmp al,80
JGE B
cmp al,70
JGE C
cmp al,60
JGE D
cmp al,60
JL E
next:
mov dl ,GRADE
mov ah,02H
int 21H
mov ah,4ch
int 21H
A:
mov GRADE,'A'
jmp next
B:
mov GRADE,'B'
jmp next
C:
mov GRADE,'C'
jmp next
D:
mov GRADE,'D'
jmp next
E:
mov GRADE ,'E'
jmp next
code ends
end main
2021-12-4