I have been given a small assignment to make a small program in assembly now I am trying to make a grade calculator you input your marks and it tells you the grade
.model small
.stack 100h
.data
Msg1 db 'Enter your total marks from 0 to 99: $'
EightyPlus db 'Congratulation you have got an A $'
.code
start:
Mov ax,@data
Mov ds,ax
Mov ah,09
Lea dx,Msg1
int 21h
mov ah,02
mov dl,10
int 21h
mov ah,01
int 21h
mov bl,01
int 21h
cmp al, '8'
jl exit
;; true1: ;; we don't really need this label anymore, as it is not referenced
mov ah,02
mov dl,10
int 21h
Mov ah,09
Lea dx,[EightyPlus]
int 21h
;; now continue and exit
exit:
Mov ah,4ch
int 21h
end start
Now what I want is that if al input is greater than or equal to 8 it should print grade A but as of now it prints grade A on every input need some help here
The bl
is just a gimmick to get two inputs from the user you can ignore it or help me to take more than one character input from user and do the task as I have asked above
EDIT: it was working through this code but now as I have used bl
it does not work again