Oh no! sorry for hitting you where is hurts.

May be you are looking for something which fires you up in the cool of Nilgiris.

How about some good ol' assembler?

Program main;

function fact(x : integer):integer;assembler;

label
    loop;
asm
.text
.align 2
    mov r1,r0
    mov r2,#1
    loop:
        mul r3,r2,r1
        mov r2,r3
        subs r1,r1,#1
        cmp r1,#0
        bgt loop

    MOV r0,r2
    MOV pc,lr
end;

Have fun.

regards

Nataraj


var
i:integer;

begin
 for i:=1 to 10 do
      writeln('factorial',i,fact(i));
 end.




On Wed, Feb 9, 2011 at 11:26 AM, Kenneth Gonsalves
<[email protected]> wrote:
> On Wed, 2011-02-09 at 10:58 +0000, Nataraj S Narayan wrote:
>> Maybe  you tried Ruby?
>
> ouch
> --
> regards
> KG
> http://lawgon.livejournal.com
> Coimbatore LUG rox
> http://ilugcbe.techstud.org/
>
> _______________________________________________
> ILUGC Mailing List:
> http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
>
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to