EasyManua.ls Logo

Intel 8080 - B1_Page_51

Intel 8080
224 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Chapter
2.
Assembly
Language
Concepts
Examples:
Assume
that
ADRS
is
an address manipulated
at
assembly-time for building tables or lists
of
items
that
must
all
be
below address 255
in
memory. The following
IF
directive
determine,
whether the high-order byte of ADRS
i, zero,
thu,>
indicating that the address
is
still
les~
'han
256:
IF
HIGH ADRS
EQ
0
Permissible
Range
of
Values
Internally,
the assembler treats each term
of
an expression
as
a two-byte, 16-bit value. Thus, the maximum
range
of
values
is
OH
through OFFFFH.
All
arithmetic operations are performed using unsigned two's comple-
ment arithmetic. The assembler performs no overflow detection for two-byte values,
so
these values are evaluated
modulo 64K.
Certain
in'>tructions require that their operands be an eight-bit value. Expressioll'> for these instructions must
yield values
in
the range 256 through +255. The assembler generates
an
error message
if
an
(>xpression for one
of
these instructions
yield,>
an
out-of-range value.
Precedence
of
Operators
NOTE
Only
instructions
that
allow registers
as
operands may have
register-type operands. Expressions containing register-type
operands are flagged as errors. The only
assembler directives
that
may contain register-type operands are EQU, SET, and
actual parameters
in
macro calls. Registers can
be
assigned
alternate names only by EQU
or
SET.
Expressions are evaluated
left
to
right. Operators with higher precedence are evaluated before
other
operators
that
immediately precede or follow them. When two operators have equal precedence, the left-most
is
evaluated
first.
Parentheses can
be
used to override normal rules
of
precedence. The part
of
an
expression enclosed
in
paren-
the,e,
i, evaluated fir,t.
If
pdrenthese, are nested, the innermost are evaluated first.
15/3+18/9
15/(3 + 18/9)
= 5 + 2 = 7
= 15/(3 +
2)
15/5 = 3
2-15

Table of Contents

Related product manuals