Click Green flag and follow instructions.
This program enhances my earlier program scriptvariables-2.sb2. We use a few "utility" custom blocks to make our stack implementation look more compact. If you would like to understand how I have designed this program, please read: http://www.abhayjoshi.net/spark/scratch/blog/Script-variables.pdf