data segment
buf db 98,65,45,63,75,21,85,65,14,32,34,65,67,34,56,88,90
n =$-buf
tab db '0123456789abcdef'
str1 db 0ah,0dh, 'Total number is :$'
str2 db 0ah,0dh, 'score>=60 number is: $'
data ends
code segment
assume cs:code,ds:data
start:mov ax,data
mov ds,ax
lea si,buf
lea bx,tab
lea dx,str1
mov ah,9
int 21h
mov al,n
mov cl,4
shr al,cl
xlatb
mov ah,2
mov dl,al
int 21h
mov al,n
and al,0fh
xlatb
mov dl,al
int 21h
mov cx,n
mov al,0
lopa: cmp [si],byte ptr 60
jb next
add al,1
daa
next:inc si
loop lopa
mov ch,al
lea dx,str2
mov ah,9
int 21h
mov al,ch
mov cl,4
shr al,cl
xlatb
mov dl,al
mov ah,2
int 21h
mov al,ch
and al,0fh
xlatb
mov dl,al
int 21h
mov ah,4ch
int 21h
code ends
end start