i am doing a clock that is operated using a 80x86 MP. it has a setting function, mine is a complete mess, please help

SET: ;START OF SET
MOV AH,00H
INT 16H
CMP AL,'6' ;6 WITH QUOTES OR WITHOUT? - CHECK IF THE NUMBER IS GREATER THAN OR EQUAL 6
JAE SET

SET: ;START OF SET
MOV AH,00H
INT 16H
CMP AL,'6' ;6 WITH QUOTES OR WITHOUT? - CHECK IF THE NUMBER IS GREATER THAN OR EQUAL 6
JAE SET

SHL Ax, 1 ;Multiply AL by two ;alot faster than mul
MOV bx, Ax ;Save 2*AL for later
shl Ax, 1 ;Multiply AL by four
shl Ax, 1 ;Multiply AL by eight

MOV BL,AL

MOV AH,00H
INT 16H

in this part i am trying to save the minutes, but i guess there is an issue with usig ascii

• : i am doing a clock that is operated using a 80x86 MP. it has a
:
: SET: ;START OF SET
: MOV AH,00H
: INT 16H
: CMP AL,'6' ;6 WITH QUOTES OR WITHOUT? - CHECK IF
: THE NUMBER IS GREATER THAN OR EQUAL 6
: JAE SET
:
:
:
: SET: ;START OF SET
: MOV AH,00H
: INT 16H
: CMP AL,'6' ;6 WITH QUOTES OR WITHOUT? - CHECK IF
: THE NUMBER IS GREATER THAN OR EQUAL 6
: JAE SET
: [color=Red]In this ^^^ case WITH quotes, because[/color]
: [color=Red]INT 16h Function 00h will input ASCII symbol[/color]
:
: SHL Ax, 1 ;Multiply AL by two ;alot faster
: than mul
: MOV bx, Ax ;Save 2*AL for later
: shl Ax, 1 ;Multiply AL by four
: shl Ax, 1 ;Multiply AL by eight
:
:
: MOV BL,AL
:
: MOV AH,00H
: INT 16H
:
: in this part i am trying to save the minutes, but i guess there is
: an issue with using ascii
:
[color=Blue]To convert ASCII digit into binary digit is simple - just add/subtract the value of zero character '0' and it is done:
[/color]
[code]
MOV AL, '7'
SUB AL, '0' ; Now AL contains binary value of 7

MOV AL, 3
ADD AL, '0' ; Now AL contains ASCII symbol '3'
[/code]