EasyManua.ls Logo

Intel 8080 - B1_Page_50

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
La'nguage
Concepts
2-14
The compare operators yield a yes-no result. Thus,
if
the
evaluation
of
the relation
is
TRUE, the value
of
the
result
is
all
ones. If false, the value
of
the resJlt
is
all
zeros. Relational operations are based strictly on magni-
tude
comparisons
of
bit values. Thus, a two's complement negative number (which always has a one
in
its high
order bit)
is
greater than a
two's
complement positive number (which always has a zero
in
its high order bit).
Since the NUL
operator
applie) only to the
rlacro
feature, NUL
is
described
in
Chapter 5.
The compare operators arc commonly used
in
conditional
IF
directives. These directives arc fully explained
in
Chapter 4.
Notice
that
the compdre
operator
must
be
sepdrated from its operands by spaces.
Example:
The following
IF
directive
te'>ts
the values
of
FLOl and
FL02
for equality.
If
the
result
of
the comparison
is
TRUE,
the assembly Idnguage coding follo.wilg the
IF
directive
is
assembled. Otherwise,
the
code
is
skipped over.
IF
FLOl
EO
FL02
Byre
Isolarion
Operarors
The
byte
isolation operators
dre
as
follows:
Operaror
Meaning
HIGH
Isolate
high-order 8 bits
of
16-hit value
LOW
Isolate low-order 8
bih
of
16-bit vdlue.
The assembler tredts
expl"Cssiom
d~
16-bit acidresses.
In
certdill cases, you need to dedi only with a part
of
an
address, or
you
need to gellerdte all 8-bit
va
ue. This
is
the functioll
of
the HIGH and
LOW
operators.
The
assembler\
relocation feature treats
all
external and relocatable ,>ymhols
as
16-bit addresses. When one
of
these symbols appedrS
in
the operdnd
expre~,sion
of
an immediate instructioll, it must be preceded
by
either the
HIGH
or
LOW
operator
to specify which byte
of
the address
is
to
be
used
in
the evaluation
of
the expression.
When neither
operator
is
present, the assembler assumes the
LOW
operator
Jild issues
an
error message.
NOTE
Any program segment containing a symbol used
as
the
argument
of
a HIGH
operator
should
be
located only on
a page boundary. This
is
done using the PAGE
option
with the CSEG or DSEG directives described
in
Chapter
4. Carries are
not
propagated from the low-order byte
when the assembler object code
is
relocated and the
carry flag
will
be
lost. Using PAGE ensures
that
this
flag
is
O.

Table of Contents

Related product manuals