Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (2)

Powered by Vanilla. Made with Bootstrap.
Stack frames
  • chroniccommand
    Posts: 1,389
    [------------------------------]
    Paper: Stack frames
    Poison ; iExploit ; HaxMe ; Intern0t ; xPC
    Author: Chroniccommand
    [------------------------------]

    [Introduction]
    I've decided to write this (very) simple and short paper to help programmers write logical code and help layout the flow of execution more clearly. We all know it is a good idea to write neat clear code. Stack frames are something that can help with this process.

    [What is a stack frame]
    A stack frame is similar to the stack(Memory). A stack frame is a diagram of functions in a program. Each function in the program has its own frame which has the parameters, variables and the function names. These are great for laying out code. We can tell which function has which parameters, which parameters have which variables etc etc. A typical stack frame looks like this:
    http://i.imgur.com/f5mBC.png
    So the main() function calls Func2() which holds a. The variable a is set to the value of "HELLO".

    You can see how this can help you write this clear code, kind of like a flow chart.

    I hope this helped you. Writing neat and clean code is a very important aspect of programming, especially when you're writing a very big program.

    --chroniccommand