I need to
use someassembler instruction to
illustrate
certain concepts in
assembler programming
But:
I do not want to
teach you
(too) many assembler instructions
yet...
So:
First, I will teach you
one simpleassembler instruction for now
Then, I will use this
(one) assembler instruction to
illustrate
a number of concepts
in assembler programming:
Addressing modes
How to
accessarray element (variables)
How to
accesslinked list variables
and so on...
Later, I will teach you the
otherassembler instructions
The move assembler instruction
Syntax:
(there are 3 MOVE instructions)
1. MOVE.B src, dest // copy a byte operand (8 bits) from src to dest
2. MOVE.W src, dest // copy a word operand (16 bits) from src to dest
3. MOVE.L src, dest // copy a long word operand (32 bits) from src to dest
Note:
The effect of the
MOVE instruction
will be explained later
(because the effect is
different using
different kind of
operands !!!)
Nomenclature
Opcode (or operation code):
The word MOVE
in:
MOVE.B D0, D1
is called the opcode
(operation code) of
the assembler instruction
Operands:
Operand of an
assembler instruction can
provide data (=
source operand) or
storage
(= destination operand) for
the assembler instruction:
A source operand provides
input to
the assembler instruction
A destination operand provides
storage space for the
output of
the assembler instruction