[Study] Full Stack Vs. Empty Stack

Stack can be classified into “Full Stack” and “Empty Stack” by addressing mode.

Full Stack : The stack pointer points to the last item in the stack.
Empty Stack : The stack pointer points to the next free space on the stack.

I prefer Empty Stack because… how can I say… It is more computer-like-expression…. :-)
Usually, in computer science, indexing starts like (i=start) and ends like (i<end)… That is, [a, b) range concept is normal…
In Empty Stack, we can say "Stack is empty" by checking (SP == Framebase). And this is more suitable for above concept…

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s