I'm somewhat new to assembly, and I'm having trouble understanding the
stack. To me, a stack is a FILO data structure. But in assembly it's
used to create scope?
Yes, it's a LIFO data structure, but that's ideal for creating scope.
By "creating scope", I imagine you're talking about activation records
when calling functions, which is really nothing more than pushing state
information for getting back to where the call was made and then
popping it off when you return.
And when you push variables to it, does it push
the values, or the references?
There's no such thing as a reference at the assembly level. Everything
is a value, but the value might be an address that acts as a reference.
Also, is there a good reference for instructions and registers
somewhere?
www.intel.com
Sorry if these questions seem pretty basic :S Any insight is greatly
appreciated
Re: How does managed code work? ... Does it work the same way as the native stack with a frame pointer that is the head of a linked list of stack frames where each time we enter a function we create a new stack frame in which new variables are pushed and each time we exit a function the entire stack frame is popped? ... Can someone point me to a discussion of the managed heap?... How does it prevent memory leaks that occur in COM when two objects reference each other and keep the others reference count nonzero? ... Because objects don't go out of scope,... (microsoft.public.dotnet.languages.csharp)
Re: finalize called on an object thats still in scope? ...Paul Tomblin wrote: ...Scope doesn't actually have anything to do with it at all. ... So, the last use of a local, is also a last time of guaranteed referencing of it from the stack, and it's referenced usually as long as some next operation replaces its stack space with another reference. ... (comp.lang.java.programmer)
Re: stack and heap ... jumps from one scope perhaps nested to another scope. ... In practical execution terms every variable (including ... but regardless of the concrete data structure used to represent ... local variables) requires that stack.... (comp.programming)
Re: EcmaScript 4 ...stack.... // definition in local stack scope... - a dummy callback function is defined on the object's prototype. ... in a subsystem while the solution logic that responded to user actions ... (comp.object)
Re: EcmaScript 4 ...stack.... // definition in local stack scope... A major goal of OOA/D is to define behaviors in exactly that sort of self-contained fashion where they only depend on the current state of the solution represented by message data and the current values of relevant state variables. ... a dummy callback function is defined on the object's prototype. ... (comp.object)