High16 and low16 operators, Decimal numbers, Hexadecimal numbers – Zilog EZ80F916 User Manual
Page 214

UM014423-0607
ZiLOG Developer Studio II
eZ80Acclaim!
®
User Manual
194
HIGH16 and LOW16 Operators
The
HIGH16
and
LOW16
operators can be used to extract specific 16-bit words from an
integer expression. The
LOW16
operator extracts the word starting at bit 0 of the expres-
sion; the
HIGH16
operator extracts the word starting at bit 16 of the expression.
HIGH16
and
LOW16
can also be used to extract portions of a floating-point value.
For example:
# LOW16 (X) ; 16 least significant bits of X
# HIGH16 (X) ; 16 most significant bits of X
NOTE: A combination of the
HIGH16
and
LOW
operators can be used to extract the most
significant byte of a 24-byte integer in the eZ80 Acclaim! For example:
TT equ %123456
segment code
LD A,HIGH(TT) ; This loads 34 into A
LD A,LOW(TT) ; This loads 56 into A
LD A,LOW(HIGH16(TT)) ; This loads 12 into A
Decimal Numbers
Decimal numbers are signed 32-bit integers consisting of the characters
0
–
9
inclusive
between
-2147483648
and
2147483647
. Positive numbers are indicated by the absence
of a sign. Negative numbers are indicated by a minus sign (
-
) preceding the number.
Underscores (_) can be inserted between digits to improve readability. For example:
1234 ; decimal
-123_456 ; negative decimal
1_000_000; decimal number with underscores
_123_; NOT an integer but a name. Underscore can be neither first
nor last character.
12E-45 ; decimal float
-123.456 ; decimal float
123.45E6 ; decimal float
Hexadecimal Numbers
Hexadecimal numbers are signed 32-bit integers ending with the
h
or
H
suffix (or starting
with the
%
prefix) and consisting of the characters
0
–
9
and
A
–
F
. A hexadecimal number
can have 1 to 8 characters. Positive numbers are indicated by the absence of a sign. Nega-
tive numbers are indicated by a minus sign (
-
) preceding the number. Underscores (_) can