bcdToBin: ;Value given in AX mov ah,dl mov al,dl and ax,0x0FF0 shr al,4 add al,48 ;peut-être optimisable add ah,48 ;idem ret
bcdByteToAscii: ;Params : BCD byte's passed in CL. ;Returns: The ASCII chars are returned in AX. push bx xor bh,bh mov bl,cl and bl,0xF0 shr bl,4 add bx,48 mov ax,bx shl ax,8 xor bh,bh mov bl,cl and bl,0x0F add bx,48 add ax,bx pop bx ret