Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Assembly Language Programming (ALP) Forum (http://www.go4expert.com/forums/assembly-language-programming-forum/)
-   -   convert hex to interger (http://www.go4expert.com/forums/convert-hex-interger-t26931/)

nataliafoster26 14Oct2011 06:25

convert hex to interger
 
how do u convert the ascii hex input (from the buffer) into an integer???:crazy:

nataliafoster26 14Oct2011 06:26

Re: convert hex to interger
 
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



All times are GMT +5.5. The time now is 09:00.