1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

convert hex to interger

Discussion in 'Assembly Language Programming (ALP) Forum' started by nataliafoster26, Oct 14, 2011.

  1. nataliafoster26

    nataliafoster26 New Member

    Joined:
    Oct 14, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    how do u convert the ascii hex input (from the buffer) into an integer???:crazy:
     
  2. nataliafoster26

    nataliafoster26 New Member

    Joined:
    Oct 14, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    oh this is what i got for now
    Code:
    push ebp
    mov ebp,esp
    sub esp,36
    push eax
    push ebx
    push ecx
    push edx
    
    
    mov esi,0    ;#chraracter count
    lea edi,[ebp-35]
    
    readchr:
    mov eax,SYS_read
    mov ebx,STDIN
    lea ecx,[ebp-36]
    mov edx,1
    int 80h
    
    mov  al,byte[ebp-36]
    cmp al,LF
    je readDone
    
    cmp esi,35
    jg readchr
    
    mov byte[edi],al
    inc esi
    inc edi
    jmp readchr
    
    readDone:
    mov byte[edi],NULL
     
    Last edited by a moderator: Oct 14, 2011

Share This Page