Coding Style




Stack Comments

Stack comments in Retro are a compact form, using short codes in place of actual words. These codes are listed in the next section.

A typical comment for a function that takes two arguments and leaves one will look like:

( xy-z )

In a few cases, functions may consume or leave a variable number of arguments. In this case, we denote it like:

( n-n || n- )

There are two other modifiers in use. Some functions have different compile-time and run-time stack use. We prefix the comment with C: for compile-time, and R: for run-time actions.

If not specified, the stack comments are for runtime effects. Functions with no C: are assumed to have no stack impact during compilation.

Code Used for
x, y, z, n Generic numbers
q, r Quotient, Remainder (for division)
" Function parses for a string
q Quote
a Address
$ Zero-terminated string
c ASCII character
f Flag
t Type constant
... Variable number of values on stack


Document Title

Document Subtitle, or Major Division Title