Factbites
 Where results make sense
About us   |   Why use us?   |   Reviews   |   PR   |   Contact us  

Topic: Stack pointer


Related Topics

In the News (Mon 6 Oct 08)

  
  Stack frame - Wikipedia, the free encyclopedia
In computing, a stack frame is a data structure used to create temporary storage for data and saved state in functions.
A special register storing the address of the bottom of the stack (stacks grow downward, that is, smaller addresses - this is a convention) is used and a program stores values in offsets off this stack pointer.
The stack frame is the collection of local variables and return address and other information stored on the stack.
en.wikipedia.org /wiki/Stack_frame   (339 words)

  
 Stack (computing) - Wikipedia, the free encyclopedia   (Site not responding. Last check: 2007-10-07)
Stacks are either visualised growing from the bottom up (like real-world stacks, see image, or, with the top of the stack in a fixed position, a coin holder [1]) or growing from left to right, so that "topmost" becomes "rightmost".
The use of a return stack is extremely commonplace, but the somewhat unusual use of an argument stack for a human-readable programming language is the reason Forth is referred to as a stack-based language.
The stack method of expression evaluation was first proposed by early German computer scientist F.L. Bauer, who received the IEEE Computer Society Pioneer Award in 1988 for his work on Computer Stacks.
en.wikipedia.org /wiki/Stack_(computing)   (787 words)

  
 Encyclopedia: Stack pointer
Stacks are either visualised growing from the bottom up (like real-world stacks, see image) or growing from left to right, so that "topmost" becomes "rightmost".
A stack may be represented in computers inside block of memory cells, with the bottom at a fixed location, and a variable stack pointer to the current top cell.
A number of computer languages are stack-oriented, meaning they define most basic operations (adding two numbers, printing a character) as taking their arguments from the stack, and placing any return values back on the stack.
www.nationmaster.com /encyclopedia/Stack-pointer   (726 words)

  
 Microprocessor having register bank and using a general purpose register as a stack pointer - Patent 5491826
However, because the bit width of the stack pointer SP is fixed, for example, when the bit width of the stack pointer SP is wide, the number of the registers which are used in the microprocessor system as the general purpose registers 102 is decreased.
When the stack pointer SP is seen as one of the special purpose registers in the special purpose register group, the special instruction or the new instruction for saving the content of the stack pointer to the bank RAM 104 must be newly added.
On the other hand, when the stack pointer SP is used in the general purpose register group 102, the number of registers in the general purpose register group 102 to be used for the stack pointer SP is increased because the bit width of the stack pointer is fixed.
www.freepatentsonline.com /5491826.html   (4397 words)

  
 Design and Implementation of Stack Pointer   (Site not responding. Last check: 2007-10-07)
The stack pointer is supposed to take in a two bit input and produce a 3 bit address and a stack full bit as an output.
As a convention for the stack pointer, it was decided to use speculative prediction and have two pointers.
It was also decided that a stack access should only take one clock cycle and hence, the stack pointer had to supply a valid address on the high part of the clock and the read or write operation to occur on the low part of the clock.
www.mit.edu /~benleong/6.371_project/stack_pointer.html   (666 words)

  
 Stack (computing) -- Facts, Info, and Encyclopedia article   (Site not responding. Last check: 2007-10-07)
A stack is a ((computer science) the organization of data (and its storage allocations in a computer)) data structure that works on the principle of (Click link for more info and facts about Last In First Out (LIFO)) Last In First Out (LIFO).
A stack-based computer system is one that is based on the use of stacks, rather than being ((computer science) memory device that is the part of computer memory that has a specific address and that is used to hold information of a specific kind) register based.
Many ((computer science) the part of a computer (a microprocessor chip) that does most of the data processing; the CPU and the memory form the central part of a computer to which the peripherals are attached) CPUs have registers that can be used as stack pointers.
www.absoluteastronomy.com /encyclopedia/s/st/stack_(computing).htm   (913 words)

  
 Stack with unary encoded stack pointer - Patent 4899307
A stack with a unary encoded stack pointer which uses the position of a single bit to point to the top of the stack.
In a second form of stack, the data itself is not moved but the addressing of the data is altered to reflect the position of a particular data element in the stack.
The present invention is a stack with a unary encoded stack pointer which uses the position of a single bit to point to the top of the stack.
www.freepatentsonline.com /4899307.html   (2199 words)

  
 [No title]
The size of the operand determine which register to use as stack pointer and whether the stack pointer is decremented by 2 or 4.
The size of the operand determine which register to use as stack pointer and whether the stack pointer is incremented by 2 or 4.
POPAW pops a word from the stack into each of, successively, DI, SI, BP, nothing (it discards a word from the stack which was a placeholder for SP), BX, DX, CX and AX.
www.cs.bgu.ac.il /~arch041/tirgul4/lab2.ppt   (1256 words)

  
 The Stack, Pointers, And Memory
Since a stack only has two operations, pushing (adding an item to the stack), and popping (removing an item from the stack), the easiest way to describe a stack is to just describe both of these operations.
Pointers and arrays implicitly convert between each other, like floats and doubles.This is an area of much confusion for many programmers, but in reality it's pretty simple.Arrays convert into pointers to their first element.Programmers can subscript pointers with indices as if they were arrays.Here are some examples:
Pointers are a very useful way to share data between functions.One particularly good use is to have `output' variables.Pointers are also the only way to share array data between functions, making them very critical.
www.biglal.net /Memory.html   (2557 words)

  
 [No title]   (Site not responding. Last check: 2007-10-07)
Variants include trash the stack, scribble the stack, mangle the stack; the term mung the stack is not used, as this is never done intentionally.
The stack is also used to dynamically allocate the local variables used in functions, to pass parameters to the functions, and to return values from the function.
In addition to the stack pointer, which points to the top of the stack (lowest numerical address), it is often convenient to have a frame pointer (FP) which points to a fixed location within a frame.
www.shmoo.com /phrack/Phrack49/p49-14   (2759 words)

  
 CALL - single segment Pascal calling sequence.
That is, "m" is the amount of stack that is private to the caller, not overlapped with the next frame.
This may be used to check for stack overflow, to initialize the stack after the arguments for debugging purposes, or by an asynchronous operation such as the break handler to find some free stack space to work with.
The Pascal stack is compatible with the stack frame used by the B language.
www.thinkage.on.ca /english/gcos/expl/pasc/call.html   (1262 words)

  
 C To 68000 Assembly Translation (Frame Pointer Operations)
The frame pointer serves as an anchor between the called and the calling function.
When the function returns, the frame pointer (A6) is copied into the stack pointer.
Decrements the stack pointer by 8 to create space for the local variables local1 and local2.
www.eventhelix.com /RealtimeMantra/Basics/CToAssemblyTranslation.htm   (722 words)

  
 SP   (Site not responding. Last check: 2007-10-07)
The Stack Pointer Register points to an indirectly addressable internal RAM location which will be used as the stack.
If an item is popped out from the stack, whatever is at the memory location being pointed by the Stack Pointer is transferred out from the stack and the stack pointer is decremented.
The Stack Pointer is actually pointing to the memory location FDh where the item at the top of the stack is held.
www.mcumaster.com /8051/registers/SP/sp.html   (438 words)

  
 Calling Conventions   (Site not responding. Last check: 2007-10-07)
Stack frames sizes are set at compile time, instead of dynamically sized at run time.
The 68K stack frame model is a conventional grown-down stack with a frame pointer (FP) and stack pointer (SP).
The stack pointer is typically aligned on a doubleword (8 byte) or quadword (16 byte) boundary which allows register values to be moved to and from the stack more efficiently.
physinfo.ulb.ac.be /divers_html/PowerPC_Programming_Info/intro_to_ppc/ppc4_runtime2.html   (2557 words)

  
 Stack Pointer (SP)   (Site not responding. Last check: 2007-10-07)
This stack can be located anywhere in the address space and can be any size up to the amount of memory available in the system.
The stack is configured as a data structure that grows downward from high memory to low memory.
The stack acts like any other stack when there is a subroutine call or on an interrupt.
www.bridgeport.edu /~risc/html/proj/introb/node45.html   (155 words)

  
 Stack Smashing   (Site not responding. Last check: 2007-10-07)
On many C implementations it is possible to corrupt the execution stack by writing past the end of an array declared auto in a routine.
Code that does this is said to smash the stack, and can cause return from the routine to jump to a random address.
When a function is called first the Instruction pointer is pushed on to the stack then the Frame pointer is copied on to the stack and after that the stack pointer is copied into the frame pointer.
homepages.wmich.edu /~m1tahir/stacksmashing.html   (712 words)

  
 The Stack   (Site not responding. Last check: 2007-10-07)
The Stack is used when the Branch/Jump to Subroutine instructions are used to keep the return address for the next instruction in the main programme.
The Stack memory is maintained by the Stack Pointer (SP) register.
The stack uses LIFO (Last In First Out) algorithm, this means that if we Push registers or data one by one onto the stack as 1, 2, 3, 4, 5 then the first value that we will get on Pull will be 5, then 4, 3, 2, and finally 1.
www.electronics.dit.ie /staff/tscarff/6800/stack/stack.htm   (272 words)

  
 [Question]activities of stack pointer and frame pointer when function called
My question is (I read some post) when a function called the frame pointer would be pushed onto the stack and then the previously stack pointer becomes the new frame pointer.
Stack frames and things are about how a function call is implemented by a specific compiler, not necessarily a C compiler, and as such is OT in clc.
I suspect you don't understand what as stack frame is. First try to read: http://en.wikipedia.org/wiki/Stack_frame (this is not a particularly good description, but you have to start somewhere).
www.codecomments.com /message362274.html   (700 words)

  
 Calling Convention   (Site not responding. Last check: 2007-10-07)
The stack pointer points to the first word after the frame.
The remaining arguments are pushed on the stack.
Establish the stack frame by subtracting the frame size from the stack pointer.
www.cs.purdue.edu /homes/hosking/502/spim/node23.html   (301 words)

  
 The Stack
Items that are pushed and popped from the stack do, however, include a size member in debug mode, so dereferencing the stack pointer may not actually get the bottom-most value.
The base pointer points to the old value of the base pointer, which is pushed onto the stack immediately when a function is called.
The utility of the base pointer is that a function can index to its parameters and its local variables from the base pointer (just as in C).
zoo.cs.yale.edu /classes/cs490/99-00a/bernstein.michael.msb35/node3.html   (525 words)

  
 Stack Pointer Limitation
The stack pointer for the chip I'm using is 8bits (address 256 bytes max).
This "simulated" stack does not use the SP register, but rather is built somewhere else in memory (depending on your memory model), possibly using the DPTR and xdata.
The effect on the stack is the same; however, RETI also clears the interrupt logic in the 8051 and allows another interrupt of the current priority to execute.
www.keil.com /discuss/docs/thread2065.htm   (700 words)

  
 Frame Registers   (Site not responding. Last check: 2007-10-07)
The register number of the frame pointer register, which is used to access automatic variables in the stack frame.
On some machines the offset between the frame pointer and starting offset of the automatic variables is not known until after register allocation has been done (for example, because the saved registers are between these two locations).
Often the former will be at an offset from the stack pointer and the latter at an offset from the frame pointer.
www.cse.unsw.edu.au /help/doc/info/gcc/Frame_Registers.html   (455 words)

  
 MC6802 - LDS - Load Stack Pointer   (Site not responding. Last check: 2007-10-07)
Loads the most significant byte of the stack pointer from the byte memory at the address specified by the program, and loads the less significant byte of the stack pointer from the next byte of memory, at one plus the address spcified by the program.
Set if the most significant bit of the stack pointer is set by the operation; cleared otherwise.
Ser if all bits of the stack pointer are cleared by the operation; cleared otherwise.
www.geocities.com /pevansph2002/lds.htm   (87 words)

  
 U.S. Pregrant 20010003201 - Pre-decoded stack pointer with post increment /decrement operation   (Site not responding. Last check: 2007-10-07)
The stack pointer is used for generating the next unutilized location in the stack memory device in order to indicate where a current value in the program counter is to be written.
The stack pointer also generates a directly preceding location to the next unutilized location in order to read the last value of the program counter that was written to the stack memory device.
The stack pointer will select the next unutilized location in the stack memory device for a write operation and the directly preceding location to the next unutilized location in the stack memory device for a read operation.
cxp.paterra.com /uspregrant20010003201.html   (213 words)

  
 MMT: Stack Pointer   (Site not responding. Last check: 2007-10-07)
As mentioned earlier, the a7 address register is made up of two stacks each of which have a register called the stack pointer, which holds the address of the top of the stack.
The stack is neccessary if the flow of a program is changed by an interupt or a subroutine call.
To add to the stack an item is pushed and to take from it an item is popped and all actions take place relative to the stack pointer.
www.dca.fee.unicamp.br /courses/EA877/1s1997/68K/stack.html   (162 words)

  
 [No title]   (Site not responding. Last check: 2007-10-07)
The return stack may be saved by having a \ memory region set aside for its context, and remembering the return \ stack pointer, or RP register.
The parameter stack may be saved by saving the top of \ stack register, or T register, and the parameter stack pointer, or SP \ register.
The RCB \ maintinas a pointer to the current owner of the resource, and a set of \ head and tail pointers to maintain a queue of tasks waiting for that \ resource.
www.elilabs.com /~rj/rr-tasker.4th   (2182 words)

  
 [No title]
The stack is faintly analogous to a data structural stack, but it has its own memory.
Memory on the stack is allocated for local variables and other oddities, like procedure call return addresses.
The stack is a stretch of memory used to store information related to procedure/method calls.
www.cs.berkeley.edu /~jrs/61bf98/lectures/38/README   (495 words)

  
 [No title]   (Site not responding. Last check: 2007-10-07)
The rest of this handout is the definition of a function and it's caller and then is implemented using the CS 310 Fall 99 Stack Frame approach.
(this is a callee save register) (assume the stack is used for all components of the activation record including the frame pointer, and access the fields of the record using the frame pointer) { int X, Y;...
--------------------------------------------------------------------------- a) Diagram the stack frame for compute (label each component and give the # of bytes for each) <------ stack pointer <------ frame pointer local variable X (4 bytes) X and Y can be in local variable Y (4 bytes) either order.
www.cs.utexas.edu /users/chris/cs310/f99/hdt/handt15.txt   (423 words)

Try your search on: Qwika (all wikis)

Factbites
  About us   |   Why use us?   |   Reviews   |   Press   |   Contact us  
Copyright © 2005-2007 www.factbites.com Usage implies agreement with terms.