Question about time?

I am trying to figure out how to get time from a user inputted string. For example the time 02:16:07 would be equal to

00010 010000 00111

I have seen an example of this for the year month and day example in Kip Irvine's book Assembly Language for Intel based computers. It shows how to isolate a bit string but I am not following it too well. Does anyone one have an exanple that maybe I could follow better? Thanks

Joe

Comments

  • : I am trying to figure out how to get time from a user inputted string. For example the time 02:16:07 would be equal to
    :
    : 00010 010000 00111
    :
    : I have seen an example of this for the year month and day example in Kip Irvine's book Assembly Language for Intel based computers. It shows how to isolate a bit string but I am not following it too well. Does anyone one have an exanple that maybe I could follow better? Thanks
    :
    : Joe
    :
    Anyone????
  • [code]
    ;Input: BL = Hex# to convert to binary ASCII
    ;Output: [ASCIIbitString] contains eight ASCII bytes representing binary
    ;Destroyed: AL, CX, DI
    Hex2Bin:
    mov di,ASCIIbitString
    mov cx,8
    H2Bloop:
    xor al,al
    rol bl,1
    adc al,"0"
    dec cx
    stosb
    jnz H2Bloop
    ret

    ASCIIbitString resb 8
    [/code]
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories