Re: Formatting in assembly




Betov wrote:
"James Daughtry" <mordock32@xxxxxxxxxxx> écrivait
news:1143764835.713649.236330@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

atoi:
mov esi,D$esp+4 | mov ecx,D$esp+8
mov eax,0

L0: jecxz L1>
; Convert from ASCII, add to LSD
movzx ebx,B$esi | sub ebx,'0'
mov edx,10 | mul edx | add eax,ebx

inc esi | dec ecx
jmp L0<
L1:
ret


* "atoi" is not an acceptable name.

Why not?

I understand it perfectly: Ascii to Integer.

Certainly any C programmer will understand what it means; and
nearly everyone programs in C

--Dragontamer

.



Relevant Pages

  • Re: rename a file
    ... a cmp al,32 is cmp al,20h: ... I just add a ZERO ascii at end of file name. ... mov si,80h; count number of letter into filename ... or al,80h; force to Upper ASCII ...
    (alt.lang.asm)
  • unsigned long -> ascii conversion
    ... into a hex value in ascii, ... but the same trick wont work if i want to convert an unsigned number in EAX ... mov eax,0x200000;the actual number we're going to convert ...
    (comp.lang.asm.x86)
  • Re: Builrt a Keyb Fr
    ... mov dx, ?? ... for ascii of Z and z ... If shift is used, ...
    (comp.lang.asm.x86)
  • Re: rename a file
    ... mov si,80h; count number of letter into filename ... "0" is a string containing an ASCII zero. ... standard name for the ASCII character whose code has numeric ...
    (alt.lang.asm)
  • Re: rename fils
    ... OK: i understand: i shodl count number of caracters in file name, ... a 0 ascii. ... mov dx,82h; offset fname ... mov di,91h; offset fname2 ...
    (comp.lang.asm.x86)