Intel 210200-002 Baby Furniture User Manual


 
ARCHITECTURE AND
INSTRUCTIONS
However, the instruction could move either a
byte or a word. The assembler must know
which
is
being moved, so it can generate the
correct instruction.
For
this reason, the
ASM-86 statement for the
MOVS instruc-
tion
must specify the items that have been
moved into SI and
D1.
For example:
ALPHA
BETA
DB
DB
MOV
MOV
MOVS
?
?
SI,OFFSET ALPHA
DI,OFFSET BETA
BETA,ALPHA
The presence of BET A and
ALPHA
in the
MOVS statement tells the assembler to gen-
erate a
MOVS instruction that moves bytes,
because the
TYPE components of both
BET A and
ALPHA
are BYTE. Further,
from the SEG components of BET A and
ALPHA, the assembler determines if the
Details of ASM-86
Sample
One:
Translate the values from input port I into a
Gray code and send result to output port
1.
operands of the MOVS instruction are inac-
cessible segments. The
OFFSET
components
of
ALPHA
and BET A are ignored.
Like
MOVS, the other four string primitives
contain operands,
MOVS and
CMPS
have
two operands, while SCAS,
LODS, and
STOS have one.
For
example:
CMPS
SCAS
LODS
STOS
BETA,ALPHA
ALPHA
ALPHA
BETA
XLA T also requires an operand; the item
that was moved into
BX
to serve as the trans-
lation table. The SEG component of this
operand enables the assembler to determine
if the translation table
is
in a currently access-
ible segment; the
OFFSET
component
is
ignored. An example of
an
XLA T statement
is
as follows:
MOV
XLAT
BX,OFFSET TABLE
TABLE
MY_DATA
GRAY
MY_DATA
SEGMENT
DB
18H,34H,05H,06H,09H,OAH,OCH,
11
H,
12H, 14H
MY_CODE
GO:
CYCLE:
ENDS
SEGMENT
ASSUME
MOV
MOV
MOV
IN
XLAT
OUT
JMP
ENDS
END
CS:MY
_CODE,
DS:MY
_DATA
AX,MY_DATA
DS,AX
BX,OFFSET GRAY
AL,1
GRAY
1,AL
CYCLE
GO
2-40
;establish data segment
;translation table
into
BX
;read in next
value
;translate
it
;output it
;and repeat