How to use the function of assembly.
2016-10-14 21:23
991 查看
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?
- iOS 后台定位审核被拒How to clarify the purpose of its use in the location modal?
- The log use to debug the function of ChangeTemplate
- How to use "man" effectively in the development of Linux
- How to properly use 'dd' to benchmark the write speed of your disk?
- how to print the spend time of one function
- The study of how to define a function in Python(20170907)
- How to enable the use of 'Ad Hoc Distributed Queries' by using sp_configure
- [Maven]How do I tell Maven to use the latest version of a dependency?
- How can I set the background of UITableView (the tableview style is "Grouped") to use an image?
- iOS 后台定位审核被拒How to clarify the purpose of its use in the locatio
- How to use the same thread function for multiple threads (safely)
- Question 33: How can a C++ developer use the placement new syntax to make new allocate an object of class SomeClass at a particu
- How to use Events in the Context of C#
- 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 use the class in assembly in XAML
- The best manual of how to use "The easiest Xdebug" addon for Firefox
- How to change the implementation (detour) of an externally declared function
- How to use Reflector to see the code of .net framework