Re: Formatting in assembly
- From: Herbert Kleebauer <klee@xxxxxxxxx>
- Date: Fri, 31 Mar 2006 13:08:19 +0200
Betov wrote:
Herbert Kleebauer <klee@xxxxxxxxx> écrivait news:442CFC6B.82DF6D79
if you read a single line, you have to move your eyes
from left to right to left to right
Yes. This is what you do each time you read any post,
on this News Group.
No, I said "if you read a single line". Show me a single line
in the text below, where you have to move your eyes "from left
to right to left to right"
But:
if
this is
really a_problem
for your
I promiss
But the C compiler generates much better code than
anything posted here (and the C source is also much better
readable than anything posted here):
unsigned int a2i(p,n) char *p; unsigned int n;
{int result=0;
while (n--) {result = result*10 + (*p++ -'0');}
return result;
}
_p$ = 8
_n$ = 12
_a2i PROC
mov ecx, DWORD PTR _n$[esp-4]
xor eax, eax
test ecx, ecx
je SHORT $LN6@a2i
mov edx, DWORD PTR _p$[esp-4]
push esi
npad 1
$LL2@a2i:
movsx esi, BYTE PTR [edx]
sub ecx, 1
lea eax, DWORD PTR [eax+eax*4]
add edx, 1
test ecx, ecx
lea eax, DWORD PTR [esi+eax*2-48]
jne SHORT $LL2@a2i
pop esi
$LN6@a2i:
ret 0
.
- References:
- Formatting in assembly
- From: James Daughtry
- Re: Formatting in assembly
- From: Betov
- Re: Formatting in assembly
- From: Herbert Kleebauer
- Re: Formatting in assembly
- From: Betov
- Formatting in assembly
- Prev by Date: Re: Formatting in assembly
- Next by Date: Re: Formatting in assembly
- Previous by thread: Re: Formatting in assembly
- Next by thread: Re: Formatting in assembly
- Index(es):
Relevant Pages
|