Chapter
2.
Assembly
Language
Concepts
Remember
tlut
number,
arc absolutc terms.
Thlh
the expression RELOC
is
not.
I
()O
i, legal, but
100
RELOC
When two relocatable symbols have
both
been defined with the ,dme type
oj
reiocaLlbility, they
m,lY
appedr
in
cerLlin expressiollS that yield an dbsulutl' result. Symbols have the
'>dme
type
of
rclocltability
when both
Ml'
rcLltive to the CSEG locdtion counter,
both
die reldtive to the DSEG luclli()n counter, both
<lrc
reldtivc
to
MEMORY, or
both
arc relative to STACK. The following cxpressions arc valid and produce absolute results:
RELOCl
.-
RELOC2
r
EQ
1
LT
RELOCl
LE
RELOC2
GT
GE
NE
Relocatdble symbols may
not
appear
in
expressions with any
other
operdtors.
The following
list
shows
dll
pmsible combinations
of
operators with absolute and relocatable terms.
An
A
in
the
table indicdtes that the resulting dddress
is
absolute; an R indicdtes d relocatable address; an I indicates an
illegdl
combination.
Notice that only one term may dppear with the
laq
five
operators
in
the list.
I
Op"'!o>
X dbsolutc X absul u
te
X relucaUble X relocatable
Y dbsolutc Y reloclldblc
Y absolute Y I"Clocatdblc
Y
A R
R
I
X +
X Y A
I
R A
X
*
Y
A I
I I
X
/
Y
A
I
I I
I
X
MOD
Y A
I
I I
I
X SHL
Y
A
I
I I
,
X SHR Y A
I
I
I
X
EQ
Y A
I
I
A
X
LT
Y A
I
I
A
X
LE
Y A I
I
A
X GT Y A
I
I
A
X
GE
Y A
I
I
A
X
NE
Y
A
I
I
A
X AND Y
A I
I I
X OR
Y
A I
I I
X XOR Y A
I
I
I
NOT
X
A
I
Hl(:;H
X
A
R
LOW
X
A
R
unary+
X
A
R
undrY
X
A
I
2-17