Contents|Index|Previous|Next

Arithmetic expressions in GASP

There are two kinds of expressions, depending on their result: absolute expressions, which resolve to a constant (that is, they do not involve any values unknown to GASP ), and relocatable expressions, which must reduce to the form shown in the following example.

addsym+const-subsym

addsym and subsym are assembly symbols of unknown value, and const is a constant. Arithmetic for GASP expressions follows very similar rules to C. You can use parentheses to change precedence; otherwise, arithmetic primitives have decreasing precedence in the order of the following list.