.model small
.data
BUF DB 'asdf12JKL;$'
NUMBER DB 0
BIGGER DB 0
SMALLER DB 0
.code
START:MOV AX,@data
MOV DS,AX
lea SI,buf
cld
CHECK:LODSB
CMP AL,'$'
JZ DONE
CMP AL,30H
JB NEXT
CMP AL,39H
JNA NUM
CMP AL,40H
JNA NEXT
CMP AL,5AH
JNA BIG
CMP AL,60H
JNA NEXT
CMP AL,7AH
JNA SMA
JMP NEXT
NUM:INC NUMBER
JMP NEXT
BIG:INC BIGGER
JMP NEXT
SMA:INC SMALLER
NEXT:jmp CHECK
done:
.exit
end start