3 Stacks

Stacks are a common, though optional, aspect of computers. Most computers support stacks in hardware. In the "standard model", the stack is stored in the main memory with other data. A CPU has a means of pointing into this stack area of memory via a "stack pointer". CEF supports the concept of multiple stack spaces, though most computer's support only one hardware stack. The TCEF_Stack_Interface class is used to access stacks which do not follow the standard model. For instance, a CPU may have a fixed-size internal stack. An instance of this class can be obtained from the TCPU object via the Get_Stack_Interface method.

TCEF_Stack_Interface has the following methods:

void Terminate()

This method destructs the object instance.

int64 Low_Bound()

This function returns the lowest valid stack entry index.

int64 High_Bound()

This function returns the highest valid stack entry index.

int Item_Size()

This function returns the size of each stack entry, in bits.

int64 Value( int64 Index )

This function returns the value of the Indexth item on the stack.

The following methods apply to Version 2.6, and later, of the specification:

boolean Grow_Up

True if the stack grows up, false if it grows down.