Re: Fastcode CharPosRev B&V 0.6.0



Hi,

while mine solution:
mov eax,edi
xor edx,edx
push edx
push eax
mov eax,esi
sub eax,$0c
cdq
add eax,[esp]
adc edx,[esp+$04]
add esp,$08

so that's a bummer :(

anyone have an better idea?

I was just looking again at the problem.. and actualy learning a bit more
basm on the way..
and I learned the cdq has to do with the negative carry bit..
but we know because adresses are > 0 it can't be an negative result (if we
rewrite the P := part delphi will figure that out too!)

so

P := Pointer((Cardinal(S) + Cardinal(Result)) - 12);

that will keep it smaller...

but the part where it's slower is that delphi chooses some different
registers and pushes en pops more..

Regards,
Davy Landman


.


Quantcast