hi,
i have philosophised about the purpose of stack a little bit and after some coding i figured out what is it's strength. The only thing that lies in my stomache is how does it work with functions? I tried to make some easy function for adding two numbers using universal registers but I suppose that's not how does it work in C for example.. where are all the parameters, local variables and where is the result stored?
how would you rewrite this to assembler?(how would compiler for C rewrite it?)
int function(int a, int &b, int *c){
return a*(b++)+(*c);
}
i know this example kinda sucks.. but this way i can understand all the possibilities