Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 716 Bytes

iii.1.3-stack-transition-diagram.md

File metadata and controls

8 lines (5 loc) · 716 Bytes

III.1.3 Stack transition diagram

The stack transition diagram displays the state of the evaluation stack before and after the instruction is executed. Below is a typical stack transition diagram.

…, value1, value2 → …, result

This diagram indicates that the stack shall have at least two elements on it, and in the definition the topmost value ("top-of-stack" or "most-recently-pushed") will be called value2 and the value underneath (pushed prior to value2) will be called value1. (In diagrams like this, the stack grows to the right, across the page). The instruction removes these values from the stack and replaces them by another value, called result in the description.