EasyManua.ls Logo

Intel 8080 - B3_Page_29

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
List items must be separated by commas. The list can contain up to eight total item,. Bec.Ju,e
of
limited work-
space, the assembler may not be able to handle eight complex expression,.
If
you ever havc this problem, ,imply
use two or more
OW
directive, to shorten the list.
The reversed
order
for
slLOring
the high and low order bytes
is
the typical format for addrc''ies stored
In
memory.
Thus, the
OW
directive
is
commonly
used for storing address constants,
Strings containing one
or
two ASCII characters enclmed
in
quotation
marK>
may
<11,0
appcar
In
the expression
list. When using such strings
in
your program, remember that the chJJ"acter's are storcd
in
reversed order.
Specifying
a string longer thdn two characters cau,es
an
error.
If
the optional label
is
present,
it
is
assigned the starling address
of
the location
counter,
and thus references the
first
byte
,tored
by the
OW
directive. (This
is
the low order byte
of
the first item
in
the expression Ii,!.)
Examplcs:
Assu
me
that
COM
P and F ILL arc label, defined elsewhere
in
the program,
COM
P
addre))e~.
memory location
3B1CH. FILL addresses memory location 3EB4H,
Label Opcode
Operands
Assembled
Code
AODR 1 .
OW
COMP
1C3B
AODR2
OW
FILL
B43E
STRNG
OW
'A','AB'
41004241
FOUR:
DW
4H
0400
MEMORY
RESERVATION
DS
Directive
The
OS
directive can
be
used to define a block
of
storage.
Label Opcode Operand
optional:
OS
expression
The value
of
'expre'>sion' specifie, the number
of
byte,
to
be
reserved for data stordge.
In
theory, this value may
range from
OOH
through OFFFFH;
in
practice, you
will
re',erve
no
more '>torage than will fit
in
your availdble
memory and still leave room for the program.
Any
,ymbol
appearing
in
the operand expression must
be
defined before the a,sembler reaches the
OS
directive.
Unlike the
DB
and
OW
ciirectives,
OS
assembles no ciata into your program. The content<.
of
the reserved storage
are unpredictable when program execution
is
initiated.
4-5

Table of Contents

Related product manuals