;input the sixten number to bx start ,no test al 0-9,a-f
;IN16,INSX,INEND
IN16 PROC
PUSH AX
PUSH CX
XOR BX,BX
MOV CL,4
MOV CH,4 ;counter
INSX: MOV AH,1
INT 21H
CMP AL,0DH
JZ INEND
CMP AL,39H
JBE ADD16
ADD AL,9
ADD16: AND AX,000FH
ROL BX,CL
OR BX,AX
DEC CH
JNZ INSX
INEND:
POP CX
POP AX
RET
IN16 ENDP
;input the sixten number in bx end