Skip to content

Latest commit

 

History

History

README.md

Chapter 4. All About Functions: Use the Concepts

Stack

Fuctions

  • How does stack work when calling function: f_explore.s

  • Create prototype of function: f_prototype.s

  • Create power function: f_power.s

  • Create subtract function: f_subtract.s

  • Write a function called square which receives one argument and returns the square of that argument: f_square.s

  • Write a program to test your square function: f_square_test.s

  • Convert the maximum program given in the Chapter 3 so that it is a function which takes a pointer to several values and returns their maximum: f_maximum.s

  • Write a program that finds length of string using function: f_strlen.s

  • Write a program that finds sum of the elements in the given list: f_sum.s

  • Write a program that finds count of duplicate elements in the given list by the number: f_dublicate.s

  • Write a program that calls maximum with 3 different lists, and returns the result of the last one as the program’s exit status code: f_maximum_3call.s

  • Create recursive factorial function: f_factorial.s

  • Create recursive fibonacci function: f_fibonacci.s

  • Explain the problems that would arise without a standard calling convention:

    • If these standard convention did not exist, it would be nearly impossible for programs created using different compilers to communicate and interact with one another. read more