the beauty of asm #2
::: first of all i'd suggest this
ARM assembler guide for everyone! it's really great an has some nice ideas, and you'll see why ARM
is a very very nice architecture. some example:
conditional execution - the very nice example on in section 2.5.4
calculating gcd - the code produced by gcc:
gcd CMP r0, r1; gcd with euclidean algo
BEQ end
BLT less
SUB r0,r0,r1
B gcd
less
SUB r1,r1,r0
B gcd
end
branches branches and branches.... the code is seven instructions long... but why not use ARM's
conditional execution feature:
gcd
CMP r0,r1
SUBGT r0, r0, r1 ; greater
SUBLT r1, r1, r0 ; less
BNE gcd
WOW!!!!! now i've realized why is it so important for every motherfuckin' programmers outthere to know
and understand asm, before starting to be a Java, C#, etc guru...