Project

General

Profile

Scol stack » History » Version 1

arkeon, 04/29/2011 07:24 PM

1 1 arkeon
h1. Scol stack
2
3
Scol virtual machine operates on the principle of a data stack, the elements are pushed or pulled into an order defined by the function. The stack status is very important, an element in the wrong place can make the stack unstable throughout the system.
4
5
h2. Representation of the Scol stack
6
7
The Scol stack can be represented as follows:
8
* Pull (MMpull) an element of the stack returns to remove this item from the stack, the order of the indexes of elements remaining in the stack is changed.
9
<pre>
10
   [_2_]
11
   [_1_]
12
   [_0_]
13
      [___] -> pull
14
</pre>
15
16
* Push (MMpush) an element in the stack returns to add this item to the stack. The order of the indexes of elements in the stack is changed, the new element is at index 0.
17
<pre>
18
          [_3_]
19
          [_2_]
20
          [_1_]
21
 push -> [_0_]
22
</pre>
23
24
h2. References
25
"Data structure":http://en.wikipedia.org/wiki/Stack_(data_structure)