Patent ID: 8793284

Claim:
An electronic device comprising: a memory; and a processor coupled to said memory for storing and accessing data in said memory; said processor for arranging the data in a stack data container comprising a plurality of values extending from a stack top to a stack bottom, operating the stack data container in first and second modes of operation, while in the first mode, pushing and popping a respective value from the stack top of the stack data container, while in the second mode, reversing an orientation of the stack data container and the plurality of values therein, and pushing and popping a respective value from the stack bottom of the reversed stack data container, storing a first plurality of values in the stack data container during the first mode and maintaining a first pair of indices for reading values from and a second pair of indices for writing values to stack locations associated with the first plurality of values, and storing a second plurality of values in the stack data container during the second mode and maintaining a first pair of indices for reading values from and a second pair of indices for writing values to stack locations associated with the second plurality of values.