: Inc CstName0 CstName1 ... CstNameN-1 :
Defines N constants
By default, Inc is a decimal number or an expression that can be immediately evaluated.
These features are extremely useful to define area of memory for storage of ASM program variables.
Note 1: If the entry point library (see related section) is installed on your calculator, all the values in the constant
library will be available in your programs the same way than constants are.
Note 2: You can define a constant in your program to override the value of an entry in the equation library.
An expression is a mathematical operation that is calculated at compilation time. Terms of this operation are
hexadecimal or decimal values, constants or labels. An expression stops on a separation character or a '
DCCP 5 @Data
are correct expressions (provided that the entry point library is installed).
A hexadecimal value must begin with a
A decimal value may begin with a
equals the offset of the current instruction in the program (This value has no meaning in
itself, but may be used to calculate the distance between a label and the current instruction). In absolute
mode, this represents the final address of the instruction.
The value of a label is the offset of the label in the program (This value has no meaning in itself, but may
be used to calculate the distance between a label and the current instruction). In absolute mode, this
represents the final address of the instruction.
Entries from the EXTABLE may be used. As the EXTABLE does not have the label names limitations
with operators, in ambiguous case (
Calculations are done with 64 bits.
X divide by 0 = $FFFFFFFFFFFFFFFF.
In order to avoid wasting memory, MASD tries to compile expressions as soon as it sees them. If MASD
is not able to compile an expression directly, it's compiled at the end of the compilation. In order to use
less memory, it's a good idea to define your constants at the beginning of the sources so MASD can
compile expression using the constants directly.
The only operator symbols not allowed in labels are +, -, * and /; therefore, if you want to use a symbol
operator after a label, you must put the symbol between " in order to 'limit' the symbol. Meaningless
A label/constant with strange char may be 'protected' between " chars.
The evaluation stack of MASD allows you to have around 10 pending computations (parenthesis,
MASD only works with integers. You can represent signed values using standard 2's complement, but be
careful as all operators are unsigned.
MASD recognizes the following operators:
6-12 The Development Library
x with a value of CP+x*Inc and then changes the CP value to CP+N*Inc.
or a number directly.
around the word:
may either be an addition
, or an entry
DUP + 5