Page 24 - Prosedur
P. 24

rfact - Stack Setup                                                                                                                                                       Rfact




















                                                                                                     Recursion















                                                                           int rfact(int x)

                                                                           {

                                                                               int rval;

                                                                               if (x <= 1)


    rfact:                                                                         return 1;

           pushl %ebp                                                          rval = rfact(x-1) ;

           movl %esp,%ebp                                                  }   return rval * x;


           pushl %ebx
   19   20   21   22   23   24   25   26   27   28   29