# HP 48gII Advanced User's Reference Manual Page 498

Graphing calculator.

: Inc CstName0 CstName1 ... CstNameN-1 :
Defines N constants
CstName
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.
4.1.10
Expressions
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
...
D1=(5)@Data+\$10/#2
D0=(5)\$5+DUP
LC(5)"DUP"+#5
are correct expressions (provided that the entry point library is installed).
Notes:
A hexadecimal value must begin with a
A decimal value may begin with a
A
or
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 (
'
DUP+#5
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
Example:
"DUP"<<5
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,
operator priority).
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.
#
DUP+#5
around the word:
""
"DUP"+#5
.
.
'.
]
, or an entry
DUP + 5

49g+