How to use the function of assembly.
2016-10-07 12:11
471 查看
Here are some simple conceptions that I summarized:
1, %rsp ----- top of the stack
2, %rbp ----- base address
3, The stack of function is upside down
So when we push a value, %rsp sub
4, We push parameters before we call a function. So the values of parameters are above the %rbp(base address).
And the values of local variables are under the %rbp.
5, We must save the former base address before calling a new function.Because maybe we are calling a function from another function. the Nested Functions.
6, after saving the value of former base address, the new base address should be pointed to the %rsp(top of the stack).
1, %rsp ----- top of the stack
2, %rbp ----- base address
3, The stack of function is upside down
So when we push a value, %rsp sub
4, We push parameters before we call a function. So the values of parameters are above the %rbp(base address).
And the values of local variables are under the %rbp.
5, We must save the former base address before calling a new function.Because maybe we are calling a function from another function. the Nested Functions.
6, after saving the value of former base address, the new base address should be pointed to the %rsp(top of the stack).
相关文章推荐
- How to use the function of assembly.
- How to use the pointer of function in a class?
- How to find the correct version of JDeveloper to use with eBusiness Suite 11i or Release 12.x
- How to use Reflector to see the code of .net framework
- The log use to debug the function of ChangeTemplate
- iOS 后台定位审核被拒How to clarify the purpose of its use in the location modal?
- This function has none of Deterministic,no sql,or reads sql data in its declaration and binary logging is enabled(you *might* want to use the less safe log_bin_trust_function_creators variable
- how to print the spend time of one function
- OA Framework - How to Find the Correct Version of JDeveloper to Use with E-Business Suite 11i or Release 12.x (Doc ID 416708.1)
- [Drupal] How to use the dsm function.
- HOW TO: Change the Owner of a User-Defined Data Type That Is in Use in SQL Server 2000
- Question 16: Which of the following methods can a developer use to override the default terminate() function in C++?
- [Maven]How do I tell Maven to use the latest version of a dependency?
- How to use "man" effectively in the development of Linux
- How to properly use 'dd' to benchmark the write speed of your disk?
- iOS 后台定位审核被拒How to clarify the purpose of its use in the locatio
- How to enable the use of 'Ad Hoc Distributed Queries' by using sp_configure
- How to change the implementation (detour) of an externally declared function
- The best manual of how to use "The easiest Xdebug" addon for Firefox
- How can I set the background of UITableView (the tableview style is "Grouped") to use an image?