problem with numbers

Discussion in 'Assembly Language Programming (ALP) Forum' started by bojomojo, Feb 2, 2008.

  1. bojomojo

    bojomojo New Member

    Joined:
    Feb 2, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    i am making a clock that is operated by a 80x86 MP, it has a setting function which i wrote twice, but i dont think any of them work.
    here they are:
    1.
    Code:
    SET:                        ;START OF SET
    MOV AH,00H
    INT 16H
    CMP AL,6   
    JAE SET
    MOV BL,AL
    MOV AH,0H
    INT 16H
    MOV CL,4
    SHL BL,CL
    ADD BL,AL
    
    MOV DX,37AH
    MOV AL,00H
    OUT DX,AL
    MOV AL,BL
    2.
    Code:
    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
    add Ax, Bx                                                    ;Add in 2*AL to get 10*AL
    
    
    MOV BL,AL
    
    MOV AH,00H
    INT 16H
    ADD BL,AL
    
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice