EasyManua.ls Logo

Intel 8080 - B3_Page_27

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
4.
Assembler
Directives
The
value assigned by the EQU directive can be recalled
in
subsequent
source lines
by
referr'ing to its dssigned
name
as
in
the
following IF directive:
IF
TYPE EQ ONES
ENDIF
SET Directive
SET
as,>igns
the
value
of
'expre~si()n'
to the name specified
In
the label field.
Label
Opcode
Operand
name
SET
The assembler
enters
the vdlue
of
'expression'
into
the
symbol table. Whenever
'ndmc'
is
encountered
sub-
sequently
in
the dssembly, the ""sembler substitutes its vdlue from the .,ymbol tdble. This value remain<; unchdnged
until
dltered by a ,1Ih,equent SET directive.
The
function
of
the SET directive
is
identicdl to EQU except thdt
'name'
Cdn
appCdr
in
multiple SET directives
In
the same plogrdm.
Therefore,
you
Cdll
alter the vdlue a,signed to
'name'
throughout
the d'>sembly.
A,sembly-time
evaludtion
of
SET expression<; always getlCldte'i d
modulo
64K addre',',.
ThLlS,
the expre'>"ion
dlwdY'>
yield,>
a value
in
the rdllge 0-65,536.
Lahel
Opcode
Operand
/Issembled
Code
IMMED SET
5
ADI
IMMED
(605
IMMED SET lOH-6
ADI
IMMED
(60A
DATA
DEFIN
ITION
The
DB
(define byte) and
DW
(define word) directives enable you to define
data
to be
<;tored
In
your
program.
Data can be specified
in
the form
of
8-bit or 16-bit values,
or
'
s a
stl'ing
of
text characters.
DB
Dirflctive
The
DB
directive stores the specified
data
in
consecutive memory locations starting with the
current
setting
of
the
location
counter.
4-3

Table of Contents

Related product manuals