zoukankan      html  css  js  c++  java
  • How to use the function of assembly.

    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).

     

  • 相关阅读:
    2021-5-14 日报博客
    2021-5-13 日报博客
    2021-5-11 日报博客
    2021-5-10 日报博客
    2021-5-8 周报博客
    团队介绍——北部大队
    周总结4
    梦断代码阅读笔记02
    周总结3
    周总结2
  • 原文地址:https://www.cnblogs.com/rixiang/p/5935701.html
Copyright © 2011-2022 走看看