Karim,
This1 too, but is shorter...
cmp al, 0Ah ; set or clear carry flag
sbb ecx, ecx ; if carry(CY) is set(CY=1) ecx= -1 else (CY=0) ecx=0
and ecx, 7 ; if CY=1 ecx=7 else ecx=0
xor ecx, 37h ; if CY=1 ecx=30h else ecx=37h
add eax, ecx ; add 30h or 37h
cmp al,10
sbb al,69h
das
impressive! i just can't believe it! i thought SBB was nonesense. but unfortunately, you can get carryflag by that. here, you use it in advantage of turning it into hex.